Skip to content

Commit 2e85615

Browse files
committed
ci release: create GitHub Releases
1 parent c4eaeff commit 2e85615

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
jobs:
7+
github:
8+
name: GitHub
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Release
14+
run: |
15+
ruby \
16+
-e 'print("## XMLua "); \
17+
puts(ARGF.read.split(/^## /)[1].gsub(/ {.+?}/, ""))' \
18+
docs/news/index.md > release-note.md
19+
title="$(head -n 1 release-note.md | sed -e 's/^## //')"
20+
tail -n +2 release-note.md > release-note-without-version.md
21+
gh release create \
22+
${GITHUB_REF_NAME} \
23+
--discussion-category Announcements \
24+
--notes-file release-note-without-version.md \
25+
--title "${title}"
26+
env:
27+
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)