diff --git a/.github/workflows/prepare_release_crates.yml b/.github/workflows/prepare_release_crates.yml index 441c223dd050b2..c1841073c1adde 100644 --- a/.github/workflows/prepare_release_crates.yml +++ b/.github/workflows/prepare_release_crates.yml @@ -7,10 +7,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -permissions: - pull-requests: write - contents: write - jobs: prepare_release: name: Prepare Release Crates diff --git a/.github/workflows/prepare_release_oxlint.yml b/.github/workflows/prepare_release_oxlint.yml index af53afe8ae9ac1..945f0ee5de25ce 100644 --- a/.github/workflows/prepare_release_oxlint.yml +++ b/.github/workflows/prepare_release_oxlint.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - - prepare-release-oxlint + - trigger-other-workflow concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -13,10 +13,48 @@ concurrency: permissions: pull-requests: write contents: write + actions: write jobs: - prepare_release: + prepare: name: Prepare Release Oxlint uses: ./.github/workflows/reusable_prepare_release.yml with: name: oxlint + + ecosystem-ci: + needs: prepare + name: Trigger Ecosystem CI + runs-on: ubuntu-latest + steps: + - uses: taiki-e/checkout-action@v1 + + - uses: peter-evans/create-or-update-comment@v4 + id: comment + with: + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ needs.prepare.outputs.pull-request-number }} + body: Triggering Ecosystem CI https://github.com/oxc-project/oxlint-ecosystem-ci/actions/workflows/ecosystem-ci.yml + + - uses: benc-uk/workflow-dispatch@v1 + with: + repo: oxc-project/oxlint-ecosystem-ci + workflow: ecosystem-ci.yml + token: ${{ secrets.PAT }} + ref: main + inputs: '{ "issue-number": "${{ needs.prepare.outputs.pull-request-number }}", "comment-id": "${{ steps.comment.outputs.comment-id }}" }' + + website: + needs: prepare + name: Update oxc.rs + runs-on: ubuntu-latest + steps: + - uses: taiki-e/checkout-action@v1 + + - uses: benc-uk/workflow-dispatch@v1 + with: + repo: oxc-project/website + workflow: oxc-project/oxc-project.github.io + token: ${{ secrets.PAT }} + ref: main + inputs: '{ "issue-number": "${{ needs.prepare.outputs.pull-request-number }}", "version": "${{ needs.prepare.outputs.version }}" }' diff --git a/.github/workflows/reusable_prepare_release.yml b/.github/workflows/reusable_prepare_release.yml index a8b1b2329e23c7..79134692513da0 100644 --- a/.github/workflows/reusable_prepare_release.yml +++ b/.github/workflows/reusable_prepare_release.yml @@ -7,15 +7,28 @@ on: required: true type: string description: "The name defined in oxc_release.toml" + outputs: + pull-request-number: + value: ${{ jobs.run.outputs.pull-request-number }} + version: + value: ${{ jobs.run.outputs.version }} env: CARGO_INCREMENTAL: 0 RUSTFLAGS: "-D warnings" +permissions: + pull-requests: write + contents: write + actions: write + jobs: run: - name: Prepare Release Crates + name: Prepare Release runs-on: ubuntu-latest + outputs: + pull-request-number: ${{ steps.pr.outputs.pull-request-number }} + version: ${{ steps.version.outputs.VERSION }} steps: - uses: actions/checkout@v4 with: @@ -59,6 +72,7 @@ jobs: - run: cargo check - uses: peter-evans/create-pull-request@v6 + id: pr with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Release ${{ inputs.name }}