diff --git a/.github/workflows/release-checks.yml b/.github/workflows/release-checks.yml new file mode 100644 index 0000000000..1f20acea22 --- /dev/null +++ b/.github/workflows/release-checks.yml @@ -0,0 +1,37 @@ +name: Release Sanity checks +on: + workflow_call: + secrets: + GITHUB_TOKEN: + required: true + inputs: + repository: + type: string + required: true + description: "The repository (in form owner/repo) to check for release blockers" + +permissions: {} +jobs: + checks: + name: Sanity checks + runs-on: ubuntu-24.04 + steps: + - name: Check for X-Release-Blocker label on any open issues or PRs + uses: actions/github-script@v7 + env: + REPO: ${{ inputs.repository }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const { REPO } = process.env; + const { data } = await github.rest.search.issuesAndPullRequests({ + q: `repo:${REPO} label:X-Release-Blocker is:open`, + per_page: 50, + }); + + if (data.total_count) { + data.items.forEach(item => { + core.error(`Release blocker: ${item.html_url}`); + }); + core.setFailed(`Found release blockers!`); + } diff --git a/.github/workflows/release-make.yml b/.github/workflows/release-make.yml index f585a8de38..03d24bfab4 100644 --- a/.github/workflows/release-make.yml +++ b/.github/workflows/release-make.yml @@ -42,26 +42,14 @@ permissions: {} jobs: checks: name: Sanity checks - runs-on: ubuntu-24.04 permissions: issues: read pull-requests: read - steps: - - name: Check for X-Release-Blocker label on any open issues or PRs - uses: actions/github-script@v7 - with: - script: | - const { data } = await github.rest.search.issuesAndPullRequests({ - q: `repo:${context.repo.owner}/${context.repo.repo} label:X-Release-Blocker is:open`, - per_page: 50, - }); - - if (data.total_count) { - data.items.forEach(item => { - core.error(`Release blocker: ${item.html_url}`); - }); - core.setFailed(`Found release blockers!`); - } + uses: matrix-org/matrix-js-sdk/.github/workflows/release-checks.yml@develop + secrets: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + repository: ${{ github.repository }} release: name: Release