Skip to content

Commit

Permalink
fix bump workflow to bump all package.json files and Cargo.tomls
Browse files Browse the repository at this point in the history
  • Loading branch information
goastler committed Jul 2, 2024
1 parent fcd9ee2 commit d78a1dd
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,19 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
run: |
# make a new branch for the version changes
git switch -c bump-version-${{ github.event.inputs.version }}
# make the version changes
npm run version ${{ github.event.inputs.version }}
git switch -c release/${{ github.event.inputs.version }}
set -eu
# find all package.json files, recursively
pkgJsons=$(find . -name package.json -prune -not -path '*/node_modules/*' -not -path '*/.next/*')
# replace the version in all package.json files
xargs -I % sh -c "cat % | jq '.version = \"${{ github.event.inputs.version }}\"' > %" <<< "$pkgJsons"
# find all Cargo.toml files
cargoTomls=$(find . -name Cargo.toml -prune -not -path '*/protocol/cargo-cache/*')
# replace the first version line in all Cargo.toml files
xargs -I % sh -c "sed -i '0,/version =/s/version =.*/version = \"${{ github.event.inputs.version }}\"/' %" <<< "$cargoTomls"
# rebuild typechain
npm run build:typechain
Expand Down

0 comments on commit d78a1dd

Please sign in to comment.