-
Notifications
You must be signed in to change notification settings - Fork 178
118 lines (96 loc) · 2.88 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Release
on:
push:
branches:
- release-*
paths:
- VERSION
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
package-arena-installer:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- linux
- darwin
arch:
- amd64
- arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read version from VERSION file
run: |
VERSION=$(cat VERSION)
echo "VERSION=${VERSION}" >> ${GITHUB_ENV}
- name: Get git commit id
run: |
COMMIT=$(git rev-parse --short HEAD)
echo "COMMIT=${COMMIT}" >>${GITHUB_ENV}
- name: Build arena installer tarball
run: |
make arena-installer OS=${{ matrix.os }} ARCH=${{ matrix.arch }}
- uses: actions/upload-artifact@v4
with:
name: arena-installer-${{ env.VERSION }}-${{ matrix.os }}-${{ matrix.arch }}
path: arena-installer-${{ env.VERSION }}-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
if-no-files-found: error
overwrite: true
push_tag:
needs:
- package-arena-installer
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Read version from VERSION file
run: |
VERSION=$(cat VERSION)
echo "VERSION=${VERSION}" >> ${GITHUB_ENV}
- name: Create and push tag
run: |
TAG="v${VERSION}"
git tag -a ${TAG} -m "Release v${VERSION}"
git push origin ${TAG}
draft_relase:
needs:
- push_tag
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Read version from VERSION file
run: |
VERSION=$(cat VERSION)
echo "VERSION=${VERSION}" >> ${GITHUB_ENV}
- name: Download arena installer tarballs
uses: actions/download-artifact@v4
with:
pattern: arena-installer-${{ env.VERSION }}-{linux,darwin}-{amd64,arm64}
- name: Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: v${{ env.VERSION }}
prerelease: ${{ contains(env.VERSION, 'rc') }}
target_commitish: ${{ github.sha }}
draft: true
files: |
arena-installer-*/arena-installer-*.tar.gz
fail_on_unmatched_files: true