Skip to content

Commit

Permalink
Bugfix: prepare-release workflow: update version number in package.json
Browse files Browse the repository at this point in the history
The regex for the filename was wrong.

Replaced the action with jq, which is more accurate in replacing only
the top level version: key.
  • Loading branch information
amtep committed Aug 9, 2022
1 parent eeb6240 commit 8432108
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ jobs:
changelog: ${{ github.workspace }}/CHANGELOG.md

- name: Update package.json
uses: jacobtomlinson/gha-find-replace@0dfd0777cc234ef6947ec1f20873c632114c4167 #! 0.1.4
with:
find: '"version": "[^"]*"'
replace: '"version": "${{ steps.update-changelog.outputs.new-version }}"'
include: ${{ github.workspace }}/package.json
run: |
jq '.version="${{ steps.update-changelog.outputs.new-version }}"' package.json > package.tmp
mv package.tmp package.json
- name: Update package-lock.json
run: npm install --ignore-scripts
Expand Down

0 comments on commit 8432108

Please sign in to comment.