-
Notifications
You must be signed in to change notification settings - Fork 705
57 lines (44 loc) · 1.6 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
49
50
51
52
53
54
55
56
57
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: Check python
run: python --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: Display working directory
run: pwd
- name: Display the release tag
run: echo ${{ github.event.release.tag_name }}
- name: Build the release binaries
run: .github/workflows/build.sh ${{ github.event.release.tag_name }}
- name: List the tarballs
run: ls -l *.tar.gz
- 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