diff options
author | Florian Bruhin <me@the-compiler.org> | 2023-08-17 11:56:03 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2023-08-17 12:42:21 +0200 |
commit | 60eb849fad32b2e3d23d9f80bcbecc34df91c7f9 (patch) | |
tree | 0898f5834165bdec114fe9fa60c7ff3d351e9d04 | |
parent | bcbfc2b68cec5512dc7934452f4c260535f58f1f (diff) | |
download | qutebrowser-60eb849fad32b2e3d23d9f80bcbecc34df91c7f9.tar.gz qutebrowser-60eb849fad32b2e3d23d9f80bcbecc34df91c7f9.zip |
ci: Check for open milestone before release
-rw-r--r-- | .github/workflows/release.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index adabed2fb..0c5b6d4b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,6 +87,21 @@ jobs: - name: Bump version id: bump run: "tox -e update-version -- ${{ github.event.inputs.release_type }}" + - name: Check milestone + uses: actions/github-script@v6 + with: + script: | + const milestones = await github.paginate(github.rest.issues.listMilestones, { + owner: context.repo.owner, + repo: context.repo.repo, + }); + const names = milestones.map(milestone => milestone.title); + console.log(`milestones: ${names}`); + + const milestone = milestones.find(milestone => milestone.title === "v${{ steps.bump.outputs.version }}"); + if (milestone !== undefined) { + core.setFailed(`Found open milestone ${milestone.title} with ${milestone.open_issues} open and ${milestone.closed_issues} closed issues!`); + } - name: Push release commit/tag run: | git push origin ${{ steps.find-branch.outputs.result }} |