-
Notifications
You must be signed in to change notification settings - Fork 18
41 lines (35 loc) · 990 Bytes
/
release.yml
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
38
39
40
41
name: Build and release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version from tag
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: Get semantic version
id: semver
uses: madhead/semver-utils@v4
with:
version: ${{ steps.version.outputs.version }}
- name: Get Changelog
id: changelog
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.version.outputs.version }}
path: ./CHANGELOG.md
- name: Create Github release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ steps.changelog.outputs.changes }}
prerelease: ${{ !!steps.semver.outputs.prerelease }}