Skip to content

Commit 43a0868

Browse files
ChaseDRedmonclaude
andcommitted
Add GitHub Actions release workflow
Automatically publishes an AOT linux-x64 binary and creates a GitHub release with auto-incrementing semantic versioning on each push to the release branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 52e79bc commit 43a0868

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [release]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Determine next version
21+
id: version
22+
run: |
23+
latest=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
24+
if [ -z "$latest" ]; then
25+
next="v1.0.0"
26+
else
27+
IFS='.' read -r major minor patch <<< "${latest#v}"
28+
patch=$((patch + 1))
29+
next="v${major}.${minor}.${patch}"
30+
fi
31+
echo "tag=$next" >> "$GITHUB_OUTPUT"
32+
echo "Next version: $next"
33+
34+
- name: Setup .NET
35+
uses: actions/setup-dotnet@v4
36+
with:
37+
dotnet-version: '10.0.x'
38+
dotnet-quality: 'preview'
39+
40+
- name: Publish linux-x64 AOT binary
41+
run: dotnet publish src/Scufpad/scufpad.csproj -c Release -r linux-x64 -o publish/
42+
43+
- name: Create GitHub Release
44+
uses: softprops/action-gh-release@v2
45+
with:
46+
tag_name: ${{ steps.version.outputs.tag }}
47+
name: Scufpad ${{ steps.version.outputs.tag }}
48+
generate_release_notes: true
49+
files: publish/scufpad

0 commit comments

Comments
 (0)