Skip to content

Commit

Permalink
ci: fix release-plz
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Feb 10, 2025
1 parent fb1ae8e commit 12cbf0d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ jobs:
VERSION: ${{ fromJSON(steps.release-plz.outputs.pr).releases[0].version }}
run: |
set -e
if [[ -n "$PR_NUMBER" ]]; then
jq --arg version "${VERSION}" '.version = ($VERSION)' npm/package.json > tmp
pr_number="${PR_NUMBER}"
if [[ -n "$pr_number" ]]; then
version="${VERSION}"
jq --arg version "${version}" '.version = ($version)' npm/package.json > tmp
mv tmp npm/package.json
gh pr checkout $PR_NUMBER
gh pr checkout $pr_number
git add .
git commit --amend --no-edit
git push --force-with-lease
Expand Down

0 comments on commit 12cbf0d

Please sign in to comment.