gocollatz/.github/workflows/build_release.yaml
Lars M. Rogne a23e5f80f0
All checks were successful
Run Tests / test (push) Successful in 12s
release / release (push) Successful in 22s
Smaller executables.
2024-04-24 22:24:47 +02:00

29 lines
772 B
YAML

name: release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '>=1.22.1'
- name: release-build-windows
run: GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o bin/collatz-${{ github.ref_name }}-windows-amd64.exe
- name: release-build-linux
run: GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o bin/collatz-${{ github.ref_name }}-linux-amd64
- name: Release
uses: https://gitea.com/actions/release-action@main
with:
files: |-
bin/**
api_key: '${{secrets.RELEASE_TOKEN}}'