Skip to content

Commit a4a935d

Browse files
committed
chore: fixing version extraction for releases
1 parent 1d6e65b commit a4a935d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,18 @@ jobs:
3939
git config --local user.email "[email protected]"
4040
git config --local user.name "GitHub Action"
4141
npm version ${{ github.event.inputs.semver }}
42-
VERSION=`cat package.json | grep version | tr -d " " | cut -d":" -f2 | tr -d "\","` >> $GITHUB_ENV
4342
git push && git push --tags
4443
4544
- name: Publish
4645
run: npm publish
4746
env:
4847
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
4948

49+
- run: |
50+
echo VERSION=$(cat package.json | grep version | tr -d " " | cut -d":" -f2 | tr -d "\",") >> $GITHUB_ENV
51+
shell: bash
52+
name: Set version as env var
53+
5054
- uses: actions/create-release@v1
5155
name: Release
5256
id: create_release

0 commit comments

Comments
 (0)