-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (66 loc) · 1.57 KB
/
release.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
build:
strategy:
fail-fast: false
matrix:
target:
- linux-amd64
- linux-arm6
- linux-arm7
- linux-arm64
include:
- target: linux-amd64
goarch: amd64
goos: linux
- target: linux-arm6
goarch: arm
goos: linux
goarm: 6
- target: linux-arm7
goarch: arm
goos: linux
goarm: 7
- target: linux-arm64
goarch: arm64
goos: linux
needs:
- release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: actions/setup-node@v4
with:
node-version: 17
- run: make
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
- run: tar -czf trollibox-${{ matrix.target }}.tar.gz -C ./bin trollibox ../config.example.yaml
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: trollibox-${{ matrix.target }}.tar.gz
tag: ${{ github.ref }}