diff --git a/.github/workflows/prepare_release_crates.yml b/.github/workflows/prepare_release_crates.yml index 441c223dd050b2..630586c8fb5f72 100644 --- a/.github/workflows/prepare_release_crates.yml +++ b/.github/workflows/prepare_release_crates.yml @@ -2,6 +2,9 @@ name: Prepare Release Crates on: workflow_dispatch: + push: + branches: + - trigger-other-workflow concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -10,6 +13,7 @@ concurrency: permissions: pull-requests: write contents: write + actions: write jobs: prepare_release: diff --git a/.github/workflows/prepare_release_oxlint.yml b/.github/workflows/prepare_release_oxlint.yml index af53afe8ae9ac1..03779ade474c9c 100644 --- a/.github/workflows/prepare_release_oxlint.yml +++ b/.github/workflows/prepare_release_oxlint.yml @@ -15,8 +15,45 @@ permissions: contents: 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 }}" }' diff --git a/.github/workflows/reusable_prepare_release.yml b/.github/workflows/reusable_prepare_release.yml index a8b1b2329e23c7..2f545b20096112 100644 --- a/.github/workflows/reusable_prepare_release.yml +++ b/.github/workflows/reusable_prepare_release.yml @@ -7,6 +7,9 @@ on: required: true type: string description: "The name defined in oxc_release.toml" + outputs: + pull-request-number: + value: ${{ jobs.run.outputs.pull-request-number }} env: CARGO_INCREMENTAL: 0 @@ -16,6 +19,8 @@ jobs: run: name: Prepare Release Crates runs-on: ubuntu-latest + outputs: + pull-request-number: ${{ steps.pr.outputs.pull-request-number }} steps: - uses: actions/checkout@v4 with: @@ -59,6 +64,7 @@ jobs: - run: cargo check - uses: peter-evans/create-pull-request@v6 + id: pr with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Release ${{ inputs.name }}