Merge remote-tracking branch 'oxc' into merge/oxc #101
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Plz | |
permissions: {} | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
release-plz: | |
name: Release-plz | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
persist-credentials: true # required by release-plz | |
- name: Run release-plz | |
id: release-plz | |
uses: MarcoIeni/release-plz-action@bbd1afc9813d25602e002b29e96e0aacebab1160 # v0.5.105 | |
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: | |
GH_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
PR_NUMBER: ${{ fromJSON(steps.release-plz.outputs.pr).number }} | |
VERSION: ${{ fromJSON(steps.release-plz.outputs.pr).releases[0].version }} | |
run: | | |
set -e | |
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 | |
git add . | |
git commit --amend --no-edit | |
git push --force-with-lease | |
fi |