-
Notifications
You must be signed in to change notification settings - Fork 699
48 lines (38 loc) · 1.53 KB
/
build-release-binaries.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
name: Build Release Binaries
on:
release:
types:
- created
jobs:
build:
name: Build Release Assets
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Display the version of go that we have installed
run: go version
- name: Checkout code
uses: actions/checkout@v2
- name: Download Go modules
run: go get ./...
- name: Update apt repo
run: sudo apt-get update
- name: Install compilers
run: sudo apt-get install gcc musl-dev musl-tools gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu gcc-riscv64-linux-gnu gcc-powerpc64le-linux-gnu gcc-mips-linux-gnu gcc-mipsel-linux-gnu gcc-mips64-linux-gnuabi64 gcc-mips64el-linux-gnuabi64
- name: Build the release binaries
run: .github/workflows/build.sh ${{ github.event.release.tag_name }}
- name: Upload Release Assets
run: |
for tarball in *.tar.gz; do
curl \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-type: application/octet-stream" \
--data-binary @$tarball \
"https://uploads.github.com/repos/rqlite/rqlite/releases/${{ github.event.release.id }}/assets?name=$tarball"
done
- name: Update the release notes
run: .github/workflows/release-notes.py ${{ secrets.GITHUB_TOKEN }} ${{ github.event.release.id }} ${{ github.event.release.tag_name }}