generated from sapphiredev/sapphire-template
-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (33 loc) · 1.21 KB
/
release-github.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
name: Create release in github based on CHANGELOG.md file
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
name: Generate relase
runs-on: ubuntu-latest
steps:
- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Get Changelog Entry
id: changelog_reader
uses: artlaman/conventional-changelog-reader-action@a2ac23f78e2d16bfec78cd0028becf5ec2246eb8 # tag=v1.1.0
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: Create/update release
uses: ncipollo/release-action@4c75f0f2e4ae5f3c807cf0904605408e319dcaac # tag=v1
with:
tag: ${{ steps.changelog_reader.outputs.version }}
name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}