File tree 2 files changed +50
-0
lines changed
2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : prerelease
2
+ on :
3
+ push :
4
+ branches :
5
+ # releases/<tag>/<version>
6
+ - releases/*/*
7
+ jobs :
8
+ prerelease :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - uses : actions/setup-node@v2
13
+ with :
14
+ node-version : ' *'
15
+ cache : ' npm'
16
+ check-latest : true
17
+ registry-url : ' https://registry.npmjs.org'
18
+ - name : Extract tag and version
19
+ id : extract
20
+ run : |-
21
+ ref=${{ github.ref }}
22
+ branch=${ref:11}
23
+ tag_version=${branch:9}
24
+ tag=${tag_version%/*}
25
+ version=${tag_version##*/}
26
+ echo "::set-output name=tag::${tag}"
27
+ echo "::set-output name=version::${version}"
28
+ - name : Log versions
29
+ run : |-
30
+ echo tag=${{ steps.extract.outputs.tag }}
31
+ echo version=${{ steps.extract.outputs.version }}
32
+ - name : Setup git user
33
+ run : git config --global user.name github-actions
34
+ - name : Setup git email
35
+ run : git config --global user.email github-actions@github.com
36
+ - name : Run npm version
37
+ run : npm version ${{ steps.extract.outputs.version }}-${{ steps.extract.outputs.tag }}
38
+ - name : Push changes
39
+ run : git push --follow-tags
40
+ - name : Run npm publish
41
+ run : npm publish --tag=${{ steps.extract.outputs.tag }}
42
+ env :
43
+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ npm test
36
36
37
37
After submitting the pull request, please make sure the Continuous Integration checks are passing.
38
38
39
+ ### Creating a prerelease
40
+
41
+ 1 . Create a branch named ` releases/<tag>/<version> ` with the version you'd like to release.
42
+ 2 . Push the branch to the repo.
43
+
44
+ For example, a branch named ` releases/rc/4.0.0 ` will create the version ` v4.0.0-rc ` and publish it under the ` rc ` tag.
45
+
39
46
## Releasing
40
47
41
48
Merge the release PR
You can’t perform that action at this time.
0 commit comments