-
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 996 Bytes
/
release.yml
File metadata and controls
37 lines (33 loc) · 996 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
35
36
37
name: Create Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Get tag annotation
id: tag_data
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "Tag name: $TAG_NAME"
git fetch --force --tags
TAG_MESSAGE=$(git tag -l --format='%(contents)' "$TAG_NAME")
echo "Tag message:"
echo "$TAG_MESSAGE"
echo "message<<EOF" >> $GITHUB_OUTPUT
echo "$TAG_MESSAGE" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.tag_data.outputs.message }}
draft: false
prerelease: ${{ contains(github.ref, '-dev.') || contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}