Skip to content

Commit 8b8b7a2

Browse files
committed
feat(.github/workflows): Add steps to generate release notes and upload binary files
Added steps in the build workflow to first generate release notes using release-drafter/release-drafter@v5. Then, if the ref starts with 'refs/tags/', upload binary files to the release using softprops/action-gh-release@v1, populating the release details from the output of the release drafter step. This streamlines the release process by automating note generation and asset upload.
1 parent a050359 commit 8b8b7a2

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,23 @@ jobs:
5959
path: artifacts
6060
merge-multiple: true
6161

62+
# First, generate the release notes
6263
- name: Draft Release
64+
id: release_drafter
6365
uses: release-drafter/release-drafter@v5
6466
env:
6567
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
69+
# Then, update the release with binary files
70+
- name: Upload Release Assets
71+
uses: softprops/action-gh-release@v1
72+
if: startsWith(github.ref, 'refs/tags/')
6673
with:
6774
files: |
6875
artifacts/aigit_darwin_amd64
6976
artifacts/aigit_darwin_arm64
7077
artifacts/aigit_windows_amd64.exe
78+
draft: false
79+
body: ${{ steps.release_drafter.outputs.body }}
80+
tag_name: ${{ steps.release_drafter.outputs.tag_name }}
81+
name: ${{ steps.release_drafter.outputs.name }}

0 commit comments

Comments
 (0)