Skip to content

Commit 147afc6

Browse files
committed
ci: update release drafter
1 parent 4011ce6 commit 147afc6

2 files changed

Lines changed: 15 additions & 37 deletions

File tree

.github/release-drafter.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ version-resolver:
132132
- 'type: patch'
133133
default: patch
134134
template: |
135+
## Disclaimer: Release Created While Under Incubation
136+
137+
Apache Grails is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Groovy Project. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
138+
135139
## What's Changed
136140
137141
$CHANGES

.github/workflows/release-notes.yml

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,20 @@ on:
2121
branches:
2222
- '[4-9]+.[0-9]+.x'
2323
pull_request:
24-
types: [opened, reopened, synchronize]
24+
types: [opened, reopened, synchronize, labeled]
2525
pull_request_target:
26-
types: [opened, reopened, synchronize]
26+
types: [opened, reopened, synchronize, labeled]
2727
workflow_dispatch:
2828
jobs:
29-
release_notes:
29+
update_release_draft:
30+
permissions:
31+
# write permission is required to create a github release
32+
contents: write
33+
# write permission is required for autolabeler
34+
pull-requests: write
3035
runs-on: ubuntu-latest
3136
steps:
32-
- uses: actions/checkout@v4
33-
- name: Check if it has release drafter config file
34-
id: check_release_drafter
35-
run: |
36-
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
37-
echo "has_release_drafter=${has_release_drafter}" >> $GITHUB_OUTPUT
38-
- name: Extract branch name
39-
id: extract_branch
40-
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
41-
# If it has release drafter:
42-
- uses: release-drafter/release-drafter@v6
43-
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
37+
- name: "📝 Update Release Draft"
38+
uses: release-drafter/release-drafter@v6
4439
env:
45-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
46-
with:
47-
commitish: ${{ steps.extract_branch.outputs.value }}
48-
# Otherwise:
49-
- name: Export Gradle Properties
50-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
51-
uses: apache/grails-github-actions/export-gradle-properties@asf
52-
- uses: apache/grails-github-actions/release-notes@asf
53-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
54-
id: release_notes
55-
with:
56-
token: ${{ secrets.GH_TOKEN }}
57-
- uses: ncipollo/release-action@1e3e9c6637e5566e185b7ab66f187539c5a76da7
58-
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
59-
with:
60-
allowUpdates: true
61-
commit: ${{ steps.release_notes.outputs.current_branch }}
62-
draft: true
63-
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
64-
tag: v${{ steps.release_notes.outputs.next_version }}
65-
bodyFile: CHANGELOG.md
66-
token: ${{ secrets.GH_TOKEN }}
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)