v1.0.2 #12
Workflow file for this run
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: Build Binaries | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [ 1.23 ] | |
os: [ linux, darwin ] | |
arch: [ amd64, arm64 ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Build binaries | |
run: | | |
mkdir -p build | |
GOARCH=${{ matrix.arch }} GOOS=${{ matrix.os }} go build -ldflags "-s -w" -trimpath -o build/tenderduty-${{ matrix.os }}-${{ matrix.arch }} main.go | |
- name: Compress | |
working-directory: ./build | |
run: gzip tenderduty-${{ matrix.os }}-${{ matrix.arch }} | |
- name: Calculate hashes | |
working-directory: ./build | |
run: sha256sum tenderduty-${{ matrix.os }}-${{ matrix.arch }}.gz > tenderduty-${{ matrix.os }}-${{ matrix.arch }}.gz.sha256sum | |
- name: Upload binaries | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: build/* |