-
-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (46 loc) · 1.45 KB
/
tag-release.yaml
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
42
43
44
45
46
47
48
name: Tag Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
permissions:
contents: write # to create a release (ncipollo/release-action)
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
writeToFile: false
includeRefIssues: true
useGitmojis: true
includeInvalidCommits: true
excludeTypes: other #build,docs,other,style
- name: Create compare tags
id: compare-tags
shell: bash
run: |
echo 'CHANGELOG<<EOF' >> $GITHUB_OUTPUT
make git-compare-tags >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-') && github.event_name != 'pull_request'
with:
allowUpdates: true
name: ${{ github.ref_name }}
body: |
${{ steps.changelog.outputs.changes }}
${{ steps.compare-tags.outputs.CHANGELOG }}
token: ${{ github.token }}