-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (56 loc) · 1.67 KB
/
reelase.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
on:
release:
types: [created]
permissions:
contents: write
packages: write
jobs:
releases-linux:
name: Release Go Binary for Linux
runs-on: ubuntu-latest
strategy:
matrix:
goarch: [amd64, arm64]
env:
goos: linux
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Build
run: go build
env:
GOOS: ${{ env.goos }}
GOARCH: ${{ matrix.goarch }}
- name: Compress
run: tar -zcvf zenv-${{ github.event.release.tag_name }}-${{ env.goos }}-${{ matrix.goarch }}.tar.gz zenv
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: zenv-${{ github.event.release.tag_name }}-${{ env.goos }}-${{ matrix.goarch }}.tar.gz
releases-macos:
name: Release Go Binary for MacOS
runs-on: macos-latest
strategy:
matrix:
goarch: [amd64, arm64]
env:
goos: darwin
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Build
run: go build
env:
GOOS: ${{ env.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 1
- name: Compress
run: tar -zcvf zenv-${{ github.event.release.tag_name }}-${{ env.goos }}-${{ matrix.goarch }}.tar.gz zenv
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: zenv-${{ github.event.release.tag_name }}-${{ env.goos }}-${{ matrix.goarch }}.tar.gz