-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 886 Bytes
/
release.yml
File metadata and controls
34 lines (30 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Extract changelog for this version
id: changelog
run: |
TAG="${GITHUB_REF_NAME}"
VERSION="${TAG#v}"
NOTES=$(awk "/^## \[?${VERSION}\]?/{found=1; next} found && /^## /{exit} found{print}" CHANGELOG.md)
if [ -z "$NOTES" ]; then
NOTES="Release ${TAG}"
fi
echo "notes<<EOF" >> "$GITHUB_OUTPUT"
echo "$NOTES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: "ShieldCode ${{ github.ref_name }}"
body: ${{ steps.changelog.outputs.notes }}
files: install.sh