Skip to content

Commit

Permalink
ci: Add release job (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
abetomo authored May 15, 2024
1 parent 2d0e647 commit 094f43e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release
on:
push:
tags:
- "*"
jobs:
github:
name: GitHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract release note
run: |
ruby \
-e 'print("## Full text search plugin "); \
puts(ARGF.read.split(/^## /)[1]. \
gsub(/ {.+?}/, ""). \
gsub(/\[(.+?)\]\[.+?\]/) {$1})' \
NEWS.md > release-note.md
- name: Upload to release
run: |
title=$(head -n1 release-note.md | sed -e 's/^## //')
tail -n +2 release-note.md > release-note-without-version.md
gh release create ${GITHUB_REF_NAME} \
--discussion-category Announcements \
--notes-file release-note-without-version.md \
--title "${title}"
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 094f43e

Please sign in to comment.