Skip to content

Commit

Permalink
ci: Update Release Script
Browse files Browse the repository at this point in the history
  • Loading branch information
springkill committed Nov 26, 2024
1 parent 445e614 commit 31e1578
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Gradle Plugin Release

on:
release:
types: [created]
types: [ created ]

jobs:
build:
Expand Down Expand Up @@ -64,20 +64,26 @@ jobs:
core.setOutput("notes", releaseNotes);
- name: Update Release with Notes
env:
RELEASE_NOTES: ${{ steps.generate_notes.outputs.notes }}
uses: actions/github-script@v6
with:
script: |
const releaseNotes = process.env.RELEASE_NOTES;
const { data: release } = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: context.payload.release.tag_name,
});
await github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
body: `${{ steps.generate_notes.outputs.notes }}`,
body: releaseNotes,
});

- name: Upload Plugin to GitHub Release
uses: actions/upload-release-asset@v1
Expand Down

0 comments on commit 31e1578

Please sign in to comment.