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