Skip to content

Commit fd2e5b0

Browse files
build: add GitHub Actions workflow for automated release creation
1 parent 426b11f commit fd2e5b0

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
# Job: Create release
10+
release:
11+
if: startsWith(github.ref, 'refs/tags/')
12+
runs-on: ubuntu-latest
13+
outputs:
14+
release-notes-url: ${{ steps.create-release.outputs.url }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
# Check if tag is valid
21+
- name: Check tag
22+
run: |
23+
if ! [[ ${{ github.ref }} =~ ^refs/tags/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
24+
exit 1
25+
fi
26+
27+
# Create release
28+
- name: Create release
29+
id: create-release
30+
uses: softprops/action-gh-release@v2
31+
with:
32+
generate_release_notes: true

0 commit comments

Comments
 (0)