File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11on : [push, pull_request]
2+
23jobs :
3- release :
4+ publish :
45 runs-on : ubuntu-latest
56 if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
67 steps :
78 - uses : actions/checkout@v2
89 with :
910 fetch-depth : 0
11+ lfs : true
1012 - name : Fetch next version
1113 id : nextVersion
12- uses : freezy/ VisualPinball.NextVersionAction @v0.1.4
14+ uses : VisualPinball/next-version-action @v0.1.6
1315 with :
1416 tagPrefix : ' v'
17+ - name : Bump
18+ if : ${{ steps.nextVersion.outputs.isBump == 'true' }}
19+ run : |
20+ npm version ${{ steps.nextVersion.outputs.nextVersion }} --no-git-tag-version
1521 - name : Publish
1622 run : |
1723 echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
18- npm version ${{ steps.nextVersion.outputs.nextVersion }} --no-git-tag-version --allow-same-version
1924 npm publish
2025 env :
2126 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
27+ - name : Commit
28+ id : commit
29+ if : ${{ steps.nextVersion.outputs.isBump == 'true' }}
30+ run : |
31+ git config user.name "github-actions"
32+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
33+ git add package.json
34+ git commit -m "chore(deps): Update to ${{ steps.nextVersion.outputs.nextTag }}."
35+ git push
36+ commitish=$(git rev-parse HEAD)
37+ echo ::set-output name=commitish::${commitish}
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2240 - name : Create Release
2341 uses : actions/create-release@v1
2442 with :
2543 tag_name : ${{ steps.nextVersion.outputs.nextTag }}
2644 release_name : ${{ steps.nextVersion.outputs.nextTag }}
2745 prerelease : ${{ steps.nextVersion.outputs.isPrerelease }}
46+ commitish : ${{ steps.commit.outputs.commitish }}
2847 env :
2948 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3049
You can’t perform that action at this time.
0 commit comments