-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.23 KB
/
publish.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
name: Publish
on:
push:
tags:
- "v*.*.*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
include:
- goos: linux
goarch: amd64
filename: gokart-prompt-linux-amd64
- goos: darwin
goarch: amd64
filename: gokart-prompt-darwin-amd64
- goos: darwin
goarch: arm64
goarm: 7
filename: gokart-prompt-darwin-arm7
- goos: windows
goarch: amd64
filename: gokart-prompt-windows-amd64
env:
CGO_ENABLED: 0
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
run: go build -o gokart ./cmd/gokart.go
- name: Package
run: |
mkdir gokart-prompt
mv gokart gokart.* README.md LICENSE.txt gokart-prompt
tar czvf ${{ matrix.filename }}.tar.gz gokart-prompt
- uses: softprops/action-gh-release@v1
with:
files: ${{ matrix.filename }}
generate_release_notes: true