Skip to content

Commit 2235918

Browse files
Update release-drafter/release-drafter action to v7 (jenkinsci#1748)
* Update release-drafter/release-drafter action to v7 * Explicitly use jenkinsci release-drafter.yml configuration Release drafter v7 no longer accepts .github as a valid extension. https://github.com/release-drafter/release-drafter/blob/master/docs/configuration-loading.md provides an example that uses this syntax for config-name and says that the _extends syntax accepts the same form. * Use release drafter 7.1.1 Also give the step a name * Release drafter 7.0.0 uses `with: token` instead of `env: GITHUB_TOKEN` (#25) The release-drafter/release-drafter#1475 breaking changes section for release drafter 7.0.0 says: If you were using a specific access token using env.GITHUB_TOKEN: $MY_CUSTOM_TOKEN, migrate to the new token: input jobs: steps: # Before - uses: release-drafter/release-drafter@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # After - uses: release-drafter/release-drafter@v7 with: token: ${{ secrets.GITHUB_TOKEN }} * Reduce risk of 'No changes' in the changelog by waiting 15 seconds Issue release-drafter/release-drafter#871 includes this comment: > PR's associated with commits are coming from GH's GraphQL API, and that > needs some time to process the same event, that triggered the release > drafter itself. We added a 15s delay before running the release drafter > step, ugly but works. A later comment from the release drafter maintainer says: > this is high-effort fix with low-effort workaround. > > Issue comes from GitHub's Graphql Commit-to-PR relation > associatedPullRequests, which take some time for github to compute. When > you push to main and trigger a release-drafter run, you sometimes end > up being faster than Github's backend and may miss this relation. > > To prevent this, simply delay your release-drafter run as @lmagyar suggested. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
1 parent 65dde12 commit 2235918

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
_extends: .github
1+
_extends: github:jenkinsci/.github:/.github/release-drafter.yml
22
tag-template: git-client-$NEXT_PATCH_VERSION
33
version-template: $MAJOR.$MINOR.$PATCH

.github/workflows/release-drafter.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ jobs:
1111
runs-on: ubuntu-latest
1212
if: github.repository_owner == 'jenkinsci'
1313
steps:
14+
# https://github.com/release-drafter/release-drafter/issues/871#issuecomment-3686135188
15+
- name: Wait for 15 seconds to ensure GraphQL consistency
16+
shell: bash
17+
run: sleep 15s
1418
# Drafts your next Release notes as Pull Requests are merged into "master"
15-
- uses: release-drafter/release-drafter@v6
16-
env:
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Release Drafter
20+
uses: release-drafter/release-drafter@139054aeaa9adc52ab36ddf67437541f039b88e2 # v7.1.1
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
1823

0 commit comments

Comments
 (0)