File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 14
14
runs-on : ubuntu-latest
15
15
env :
16
16
VERSION : ${{ github.event.inputs.version }}
17
+ outputs :
18
+ tag : ${{ steps.get-tag.outputs.TAG }}
17
19
steps :
18
20
- run : |
19
21
if [[ "$VERSION" != "major" ]] && [[ "$VERSION" != "minor" ]] && [[ "$VERSION" != "patch" ]]; then
@@ -31,11 +33,12 @@ jobs:
31
33
node-version-file : package.json
32
34
- run : npm ci
33
35
- run : npm version $VERSION
36
+ - id : get-tag
37
+ run : |
38
+ echo "TAG=$(npm run env | grep npm_package_version | cut -d '=' -f 2)" >> $GITHUB_OUTPUT
34
39
npm :
35
40
runs-on : ubuntu-latest
36
41
needs : version
37
- env :
38
- VERSION : ${{ github.event.inputs.version }}
39
42
steps :
40
43
- uses : actions/checkout@v4
41
44
@@ -45,14 +48,12 @@ jobs:
45
48
uses : JS-DevTools/npm-publish@v3
46
49
with :
47
50
token : ${{ secrets.NPM_TOKEN }}
48
- - run : |
49
- echo "TAG=$(npm run env | grep npm_package_version | cut -d '=' -f 2)" >> $GITHUB_ENV
50
51
- name : Create Github Release
51
52
uses : actions/create-release@v1
52
53
env :
53
54
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
55
with :
55
- tag_name : refs/tags/${{ env .TAG }}
56
- release_name : Version ${{ env .TAG }}
57
- body : Version ${{ env .TAG }}
56
+ tag_name : refs/tags/${{ needs.version.outputs .TAG }}
57
+ release_name : Version ${{ needs.version.outputs .TAG }}
58
+ body : Version ${{ needs.version.outputs .TAG }}
58
59
You can’t perform that action at this time.
0 commit comments