generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 24
42 lines (40 loc) · 1.37 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Release
on:
workflow_dispatch:
inputs:
major:
description: Major version number (MAJOR.minor.patch)
required: true
minor:
description: Minor version number (major.MINOR.patch)
required: true
patch:
description: Patch version number (major.minor.PATCH)
required: true
jobs:
release:
runs-on: ubuntu-latest
env:
MAJOR: ${{ inputs.major }}
MINOR: ${{ inputs.minor }}
PATCH: ${{ inputs.patch }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: configure git
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- run: npm version "${MAJOR}.${MINOR}.${PATCH}"
- name: update tags
run: |
git push origin main
git push origin "v${MAJOR}.${MINOR}.${PATCH}"
git tag -fa "v${MAJOR}.${MINOR}" -m "setup-ndk v${MAJOR}.${MINOR}.${PATCH}"
git push origin "v${MAJOR}.${MINOR}" --force
git tag -fa "v${MAJOR}" -m "setup-ndk v${MAJOR}.${MINOR}.${PATCH}"
git push origin "v${MAJOR}" --force
git checkout -b "releases/v${MAJOR}.${MINOR}.${PATCH}"
git push origin "releases/v${MAJOR}.${MINOR}.${PATCH}"