-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1023 Bytes
/
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
name: Build and Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build_and_release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build binaries
run: |
GOOS=linux GOARCH=386 go build -o bin/gpt_cmd-linux-386
GOOS=linux GOARCH=amd64 go build -o bin/gpt_cmd-linux
GOOS=linux GOARCH=arm go build -o bin/gpt_cmd-linux-arm
GOOS=linux GOARCH=arm64 go build -o bin/gpt_cmd-linux-arm64
GOOS=darwin GOARCH=amd64 go build -o bin/gpt_cmd-darwin-amd64
GOOS=darwin GOARCH=arm64 go build -o bin/gpt_cmd-darwin-arm64
GOOS=windows GOARCH=386 go build -o bin/gpt_cmd-windows-386.exe
GOOS=windows GOARCH=amd64 go build -o bin/gpt_cmd-windows.exe
- name: Create release
uses: ncipollo/[email protected]
with:
artifacts: 'bin/*'