Skip to content

Commit

Permalink
ci: update package.json in release-plz.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Sep 6, 2024
1 parent 56f02c0 commit 82dd4eb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,30 @@ jobs:
cache-key: warm

- name: Run release-plz
id: release-plz
uses: MarcoIeni/[email protected]
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Bump package.json
if: ${{ steps.release-plz.outputs.prs_created }}
env:
RELEASES: ${{ steps.release-plz.outputs.releases }}
PR: ${{ steps.release-plz.outputs.pr }
run: |
set -e
pr_number=${{ fromJSON(steps.release-plz.outputs.pr).number }}
if [[ -n "$pr_number" ]]; then
version=$(echo "$RELEASES" | jq -r '.[0].version')
echo "version: $version"
jq --arg version "${version}" '.version = ($version)' npm/package.json > tmp
mv tmp npm/package.json
gh pr checkout $pr_number
git add .
git commit -m "Update package.json"
git push
fi
5 changes: 0 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,3 @@ benchmark:
# Run cargo-fuzz
fuzz:
cd fuzz && cargo +nightly fuzz run --sanitizer none resolver -- -only_ascii=1 -max_total_time=900

release:
cargo binstall -y release-plz cargo-semver-checks
release-plz update
just check

0 comments on commit 82dd4eb

Please sign in to comment.