-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (34 loc) · 1.27 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
name: WSGet Release
on:
release:
types:
- created
jobs:
build:
name: Generate builds
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.21.x'
- name: Build Linux
run: GOOS=linux GOARCH=amd64 go build -buildmode=exe -o ./wsget ./cmd/wsget
- name: Compress Linux
run: tar -czvf ./wsget-$(git describe --tags --abbrev=0).linux-amd64.tar.gz ./wsget ./LICENSE ./README.md
- name: Build MacOS (Intel)
run: GOOS=darwin GOARCH=amd64 go build -buildmode=exe -o ./wsget ./cmd/wsget
- name: Compress MacOS (Intel)
run: tar -czvf ./wsget-$(git describe --tags --abbrev=0).darwin-amd64.tar.gz ./wsget ./LICENSE ./README.md
- name: Build MacOS (M)
run: GOOS=darwin GOARCH=arm64 go build -buildmode=exe -o ./wsget ./cmd/wsget
- name: Compress MacOS (M)
run: tar -czvf ./wsget-$(git describe --tags --abbrev=0).darwin-arm64.tar.gz ./wsget ./LICENSE ./README.md
- name: Copy build-artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: "./*.tar.gz"