Merge pull request #636 from prymitive/go-mod-upgrades #1093
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |