-
Notifications
You must be signed in to change notification settings - Fork 21
27 lines (27 loc) · 935 Bytes
/
build.yml
File metadata and controls
27 lines (27 loc) · 935 Bytes
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
name: 'build'
on:
push:
tags:
- 'v*'
jobs:
build_and_release:
runs-on: 'ubuntu-latest'
steps:
- name: 'Clone repo'
uses: 'actions/checkout@v4'
- name: 'Install go'
uses: 'actions/setup-go@v5'
with:
go-version: 'stable'
- run: 'GOOS=linux GOARCH=amd64 go build -ldflags "-w" -o wgo-linux .'
- run: 'GOOS=linux GOARCH=arm64 go build -ldflags "-w" -o wgo-linux-arm .'
- run: 'GOOS=darwin GOARCH=amd64 go build -ldflags "-w" -o wgo-macos .'
- run: 'GOOS=darwin GOARCH=arm64 go build -ldflags "-w" -o wgo-macos-apple-silicon .'
- run: 'GOOS=windows GOARCH=amd64 go build -ldflags "-w" -o wgo-windows.exe .'
- name: 'Create release'
uses: 'svenstaro/upload-release-action@v2'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
tag: '${{ github.ref }}'
file: 'wgo-*'
file_glob: 'true'