Skip to content

Commit 7b05154

Browse files
committed
Experimental: Automate release
1 parent ed53e6f commit 7b05154

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Download artifacts
13+
id: download-artifact
14+
- uses: dawidd6/action-download-artifact@v7
15+
with:
16+
workflow: build.yml
17+
commit: ${{ github.sha }}
18+
# branch: main
19+
event: release
20+
skip_unpack: true
21+
22+
- name: Parse changelog
23+
- uses: actions/checkout@v4
24+
- uses: actions-ecosystem/action-regex-match@v2
25+
id: regex-match
26+
with:
27+
text: CHANGELOG.md
28+
regex: |
29+
'## \['
30+
${{ github.event.release.tag_name }}
31+
'\].*\n\n((.|\n)*)(?:## \[[0-9]+.[0-9]+.[0-9]+\])'
32+
flags: gm
33+
34+
- name: Release
35+
- uses: softprops/action-gh-release@v2
36+
with:
37+
body: ${{ steps.regex-match.outputs.group1 }}
38+
- uses: shogo82148/actions-upload-release-asset@v1
39+
with:
40+
upload_url: ${{ github.event.release.upload_url }}
41+
asset_path: *.zip

0 commit comments

Comments
 (0)