biome-release-cli-event #48
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
| # This workflow is triggered when a release is published. It then creates a PR which creates the new schema | |
| name: Schema | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| sha: | |
| description: Commit ID of biomejs/biome | |
| required: false | |
| type: string | |
| default: "_test" | |
| tag: | |
| description: The tag e.g. @biomejs/biome@2.0.0 | |
| required: true | |
| type: string | |
| default: "@biomejs/biome@0.0.0" | |
| version: | |
| description: The version e.g. 2.0.0 | |
| required: true | |
| type: string | |
| default: "0.0.0" | |
| repository_dispatch: | |
| types: [ biome-release-cli-event ] | |
| permissions: | |
| actions: write | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| synchronize: | |
| runs-on: depot-ubuntu-24.04-arm-16 | |
| env: | |
| COMMIT_ID: ${{ github.event.inputs.sha || github.event.client_payload.sha }} | |
| TAG: ${{ github.event.inputs.tag || github.event.client_payload.tag }} | |
| BIOME_VERSION: ${{ github.event.inputs.version || github.event.client_payload.version }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm | |
| run: | | |
| npm install -g corepack@latest | |
| corepack enable | |
| - name: Setup node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version-file: ".node-version" | |
| - name: Update revision | |
| if: ${{ env.COMMIT_ID != '_test' }} | |
| run: ./scripts/update-revision.sh '${{ env.COMMIT_ID }}' | |
| - name: Run codegen | |
| uses: ./.github/actions/run-codegen | |
| with: | |
| kinds: all | |
| version: ${{ env.BIOME_VERSION }} | |
| - name: Create pull request | |
| id: create-pull-request | |
| uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 | |
| with: | |
| branch: "chore/synchronize-${{ github.event_name }}" | |
| author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | |
| title: "release: synchronize to `${{ env.BIOME_VERSION }}`" | |
| commit-message: "release: synchronize to `${{ env.BIOME_VERSION }}`" | |
| body: "Synchronize to [`${{ env.BIOME_VERSION }}`](https://github.com/biomejs/biome/commit/${{ env.COMMIT_ID }})." | |
| labels: CI-Synchronize | |
| - name: Create PR and auto merge | |
| if: ${{ steps.create-pull-request.outputs.pull-request-operation != 'closed' && steps.create-pull-request.outputs.pull-request-number != '' && env.COMMIT_ID != '_test' }} | |
| run: gh pr merge --squash --auto --delete-branch ${{ steps.create-pull-request.outputs.pull-request-number }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |