Skip to content

Commit 44c1b6d

Browse files
committed
ci: update WorkFlow
1 parent 1000cb6 commit 44c1b6d

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66

77
jobs:
88
build:
9-
109
runs-on: ubuntu-latest
1110
permissions:
1211
contents: write
@@ -28,6 +27,30 @@ jobs:
2827
- name: Build Plugin with Gradle
2928
run: ./gradlew buildPlugin
3029

30+
- name: Generate Release Notes
31+
id: generate_notes
32+
uses: actions/generate-release-notes@v2
33+
with:
34+
owner: ${{ github.repository_owner }}
35+
repo: ${{ github.event.repository.name }}
36+
tag_name: ${{ github.event.release.tag_name }}
37+
38+
- name: Update Release with Notes
39+
uses: actions/github-script@v6
40+
with:
41+
script: |
42+
const { data: release } = await github.rest.repos.getReleaseByTag({
43+
owner: context.repo.owner,
44+
repo: context.repo.repo,
45+
tag: context.payload.release.tag_name,
46+
});
47+
await github.rest.repos.updateRelease({
48+
owner: context.repo.owner,
49+
repo: context.repo.repo,
50+
release_id: release.id,
51+
body: `${{ steps.generate_notes.outputs.notes }}`,
52+
});
53+
3154
- name: Upload Plugin to GitHub Release
3255
uses: actions/upload-release-asset@v1
3356
env:

0 commit comments

Comments
 (0)