-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (41 loc) · 1.07 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
name: Build and Release
on:
push:
branches:
- main
tags:
- v*
jobs:
build-and-release:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: stable
- name: Build
env:
CGO_ENABLED: 0
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
GOOS=$GOOS GOARCH=$GOARCH go build -trimpath -o build/raiden ./cmd/raiden/main.go
cd build
if [[ $GOOS == 'darwin' ]]; then
tar cvf raiden-macos-"$GOARCH".tar.gz raiden
else
tar cvf raiden-"$GOOS"-"$GOARCH".tar.gz raiden
fi
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/raiden-*
make_latest: true
generate_release_notes: true