-
Notifications
You must be signed in to change notification settings - Fork 27
58 lines (50 loc) · 1.54 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
58
name: release
on:
push:
branches:
- "**"
tags:
- "**"
jobs:
release:
name: create release
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: checkout code
uses: actions/checkout@v4
- name: set up go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: build
run: |
make paddler-bin-linux-x64
- name: determine tag type
id: tag_type
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+$ ]]; then
echo "tag_type=PRE_RELEASE_TAG" >> $GITHUB_OUTPUT
elif [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "tag_type=RELEASE_TAG" >> $GITHUB_OUTPUT
else
echo "tag_type=INVALID_TAG" >> $GITHUB_OUTPUT
fi
- name: create pre-release
id: create_prerelease
if: steps.tag_type.outputs.tag_type == 'PRE_RELEASE_TAG'
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: paddler-bin-linux-x64
generate_release_notes: true
prerelease: true
- name: create release
id: create_release
if: steps.tag_type.outputs.tag_type == 'RELEASE_TAG'
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: paddler-bin-linux-x64
generate_release_notes: true
prerelease: false