-
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (47 loc) · 1.38 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: create-release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
# https://semver.org/ proper release tags, more or less
- "v[0-9]+.[0-9]+.[0-9]+"
# prerelease tags, more or less
- "v[0-9]+.[0-9]+.[0-9]+-*"
env:
TMP_CHANGELOG_FILENAME: TMP_CHANGELOG.md
jobs:
release:
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/')
container:
image: golang:1.19
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Task
uses: arduino/setup-task@v1
- name: Install changelog
run: task changelog:install
- name: Check dependences
run: task changelog:check
- id: get_version
uses: battila7/get-version-action@v2
- name: set vars to github
run: |
echo "APP_TAG=${{ steps.get_version.outputs.version-without-v }}" >> $GITHUB_ENV
- name: Generate changelog
run: task changelog:tag
- name: Create Release
if: ${{ !env.ACT }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: ${{ env.APP_TAG }}
release_name: ${{ env.APP_TAG }}
draft: false
prerelease: false
body_path: ${{ env.TMP_CHANGELOG_FILENAME }}