forked from l7mp/stunner
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 2.13 KB
/
publish--add-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
58
59
60
61
62
63
64
65
66
67
68
name: "publish: Add binaries to release assets"
on:
workflow_call:
jobs:
add_binaries:
name: Add binaries to release assets
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: linux
arch: amd64
file_end: ""
- os: linux
arch: arm64
file_end: ""
- os: darwin
arch: amd64
file_end: ""
- os: darwin
arch: arm64
file_end: ""
- os: windows
arch: amd64
file_end: ".exe"
- os: windows
arch: arm64
file_end: ".exe"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: vars
run: echo tag=$(echo ${GITHUB_REF:11}) >> $GITHUB_OUTPUT
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Build binaries
run: |
export CGO_ENABLED=0 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }}
make build-bin
mv bin/turncat turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}
mv bin/stunnerctl stunnerctl-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}
- name: Release turncat binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}
tag: ${{ github.ref_name }}
asset_name: turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}
- name: Release stunnerctl binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: stunnerctl-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}
tag: ${{ github.ref_name }}
asset_name: stunnerctl-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}