File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release Workflow
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+ - " v*.*.*-*"
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ release :
14+ name : Create Release
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+
23+ - name : Get version
24+ id : get_version
25+ run : |
26+ VERSION=${GITHUB_REF#refs/tags/}
27+ echo "VERSION=$VERSION" >> $GITHUB_ENV
28+ echo "version=$VERSION" >> $GITHUB_OUTPUT
29+
30+ # Determine if this is a pre-release
31+ if [[ "$VERSION" == *-* ]]; then
32+ echo "prerelease=true" >> $GITHUB_OUTPUT
33+ else
34+ echo "prerelease=false" >> $GITHUB_OUTPUT
35+ fi
36+
37+ - name : Generate release notes
38+ run : |
39+ cat > release-notes.md << 'NOTES'
40+ ## Release ${{ steps.get_version.outputs.version }}
41+
42+ ### What's New
43+
44+ Check the [CHANGELOG](./CHANGELOG.md) for details.
45+
46+ ### Installation
47+
48+ ```bash
49+ # Clone and build
50+ git clone https://github.com/${{ github.repository }}.git
51+ cd webapp
52+ bun install
53+ bun run build
54+ ```
55+
56+ ### Verify
57+
58+ ```bash
59+ bun run typecheck
60+ bun run lint
61+ bun test
62+ ```
63+
64+ ---
65+
66+ **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.get_version.outputs.version }}...main
67+ NOTES
68+
69+ - name : Create GitHub Release
70+ uses : softprops/action-gh-release@v2
71+ with :
72+ name : Release ${{ steps.get_version.outputs.version }} 🎉
73+ body_path : release-notes.md
74+ draft : false
75+ prerelease : ${{ steps.get_version.outputs.prerelease }}
76+ env :
77+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments