-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (46 loc) · 1.3 KB
/
goreleaser.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
name: goreleaser
on:
pull_request:
push:
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
env:
flags: ""
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Test
run: go test ./...
- name: Dependencies
run: |
sudo apt install -qy binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
mkdir /tmp/zlib
cd /tmp/zlib
wget https://www.zlib.net/current/zlib.tar.gz
tar xvf zlib.tar.gz
cd zlib-*
CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-ar CHOST=arm64 ./configure --static
make
sudo make install
- name: Is snapshot?
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: echo "flags=--snapshot" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean ${{ env.flags }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: snapshot
path: dist/*