Skip to content

Commit

Permalink
chore: fixing version extraction for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
aviadhahami committed Jul 20, 2023
1 parent 1d6e65b commit a4a935d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,18 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
npm version ${{ github.event.inputs.semver }}
VERSION=`cat package.json | grep version | tr -d " " | cut -d":" -f2 | tr -d "\","` >> $GITHUB_ENV
git push && git push --tags
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- run: |
echo VERSION=$(cat package.json | grep version | tr -d " " | cut -d":" -f2 | tr -d "\",") >> $GITHUB_ENV
shell: bash
name: Set version as env var
- uses: actions/create-release@v1
name: Release
id: create_release
Expand Down

0 comments on commit a4a935d

Please sign in to comment.