-
-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (39 loc) · 947 Bytes
/
build.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
---
name: build
on:
release:
types:
- created
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos:
- freebsd
- linux
- darwin
goarch:
- '386'
- amd64
- arm64
exclude:
- goarch: '386'
goos: darwin
steps:
- uses: actions/checkout@v4
- name: set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Test
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- uses: actions/checkout@v4
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: www
ldflags: -s -w -X main.version=${{ env.RELEASE_VERSION }}