File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 3232
3333 # Update the version in package.json
3434 - name : Update version
35+ id : update_version
3536 run : |
3637 VERSION="0.0.1-alpha.$HASH"
3738 jq --arg ver "$VERSION" '.version = $ver' package.json > tmp.json && mv tmp.json package.json
39+ echo "VERSION=$VERSION" >> $GITHUB_ENV
3840
3941 # Build the package
4042 - name : Build package
4951 env :
5052 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
5153 run : npm publish
54+
55+ # Create Git tag
56+ - name : Create Git tag
57+ run : |
58+ git config --local user.name "github-actions[bot]"
59+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
60+ git tag ${{ env.VERSION }}
61+ git push origin ${{ env.VERSION }}
62+
63+ # Create GitHub Release
64+ - name : Create GitHub Release
65+ uses : actions/create-release@v1
66+ env :
67+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68+ with :
69+ tag_name : ${{ env.VERSION }}
70+ release_name : Release ${{ env.VERSION }}
71+ draft : false
72+ prerelease : true
You can’t perform that action at this time.
0 commit comments