File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change 1
1
on : [push, pull_request]
2
+
2
3
jobs :
3
- release :
4
+ publish :
4
5
runs-on : ubuntu-latest
5
6
if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
6
7
steps :
7
8
- uses : actions/checkout@v2
8
9
with :
9
10
fetch-depth : 0
10
- lfs : true
11
+ lfs : true
11
12
- name : Fetch next version
12
13
id : nextVersion
13
- uses : freezy/ VisualPinball.NextVersionAction @v0.1.4
14
+ uses : VisualPinball/next-version-action @v0.1.6
14
15
with :
15
16
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
16
21
- name : Publish
17
22
run : |
18
23
echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
19
- npm version ${{ steps.nextVersion.outputs.nextVersion }} --no-git-tag-version --allow-same-version
20
24
npm publish
21
25
env :
22
26
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 }}
23
40
- name : Create Release
24
41
uses : actions/create-release@v1
25
42
with :
26
43
tag_name : ${{ steps.nextVersion.outputs.nextTag }}
27
44
release_name : ${{ steps.nextVersion.outputs.nextTag }}
28
45
prerelease : ${{ steps.nextVersion.outputs.isPrerelease }}
46
+ commitish : ${{ steps.commit.outputs.commitish }}
29
47
env :
30
48
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31
49
You can’t perform that action at this time.
0 commit comments