Skip to content

Commit b6d92bd

Browse files
committed
feat: upgrade GitHub Release workflow to modern action
- Replace deprecated actions/create-release@v1 with softprops/action-gh-release@v1 - Improve release notes with better formatting and installation instructions - Simplify workflow by removing temporary file generation - Add emoji and structured release description for better UX
1 parent 2f04117 commit b6d92bd

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,24 @@ jobs:
5353
env:
5454
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5555

56-
- name: Generate changelog
57-
id: changelog
58-
run: |
59-
# Extract version from tag
60-
VERSION=${GITHUB_REF#refs/tags/v}
61-
echo "version=$VERSION" >> $GITHUB_OUTPUT
62-
63-
# Generate changelog (you might want to use a tool like conventional-changelog)
64-
echo "## Changes in v$VERSION" > CHANGELOG_TEMP.md
65-
echo "" >> CHANGELOG_TEMP.md
66-
echo "See the [full changelog](https://github.com/${{ github.repository }}/compare/v$(git describe --tags --abbrev=0 HEAD^)...v$VERSION) for details." >> CHANGELOG_TEMP.md
67-
6856
- name: Create GitHub Release
69-
uses: actions/create-release@v1
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
uses: softprops/action-gh-release@v1
7258
with:
73-
tag_name: ${{ github.ref }}
74-
release_name: Release v${{ steps.changelog.outputs.version }}
75-
body_path: CHANGELOG_TEMP.md
59+
tag_name: ${{ github.ref_name }}
60+
name: Release ${{ github.ref_name }}
61+
body: |
62+
## 🚀 What's Changed in ${{ github.ref_name }}
63+
64+
- 📦 Published to NPM: `npm install agui-chain@${{ github.ref_name }}`
65+
- 🔗 [Full Changelog](https://github.com/${{ github.repository }}/compare/${{ github.event.before }}...${{ github.ref_name }})
66+
67+
### 📋 Installation
68+
```bash
69+
npm install agui-chain@${{ github.ref_name }}
70+
# or
71+
pnpm add agui-chain@${{ github.ref_name }}
72+
```
7673
draft: false
7774
prerelease: false
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)