-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (41 loc) · 1.21 KB
/
go.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
name: Go
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.4
- name: Check out code
uses: actions/checkout@v4
- name: Crosscompile binaries
run: make crosscompile -j 2
- name: Compress binaries
run: |
mkdir -p artifacts
export SOURCE_DATE_EPOCH=$(git show -s --format=%ci ${GITHUB_SHA})
for i in kthxbye-*; do tar --mtime="${SOURCE_DATE_EPOCH}" --owner=0 --group=0 --numeric-owner -c $i | gzip -n - > artifacts/$i.tar.gz; done
shasum -a 512 artifacts/kthxbye-*.tar.gz | tee artifacts/sha512sum.txt
- name: Get release
if: github.event_name == 'release'
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload binaries to GitHub release
if: github.event_name == 'release'
uses: AButler/[email protected]
with:
files: "artifacts/*"
repo-token: ${{ secrets.GITHUB_TOKEN }}