-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.69 KB
/
Copy pathrelease.yaml
File metadata and controls
58 lines (54 loc) · 1.69 KB
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
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- linux/amd64
- linux/arm64
- darwin/amd64
- darwin/arm64
- windows/amd64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.target == 'linux/amd64' && 'linux' || matrix.target == 'linux/arm64' && 'linux' || matrix.target == 'darwin/amd64' && 'darwin' || matrix.target == 'darwin/arm64' && 'darwin' || 'windows' }}
GOARCH: ${{ matrix.target == 'linux/amd64' && 'amd64' || matrix.target == 'linux/arm64' && 'arm64' || matrix.target == 'darwin/amd64' && 'amd64' || matrix.target == 'darwin/arm64' && 'arm64' || 'amd64' }}
CGO_ENABLED: 0
run: |
go build -trimpath -ldflags "-s -w" -o queuekit ./cmd/queuekit
tar czf queuekit-${{ matrix.target }}.tar.gz queuekit
- uses: actions/upload-artifact@v4
with:
name: queuekit-${{ matrix.target }}
path: queuekit-${{ matrix.target }}.tar.gz
publish:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-matches: true
- name: Generate checksums
working-directory: artifacts
run: |
sha256sum *.tar.gz > checksums.txt
- uses: softprops/action-gh-release@v2
with:
files: |
artifacts/*.tar.gz
artifacts/checksums.txt
generate_release_notes: true