gocollatz/.github/workflows/build_release.yaml

29 lines
772 B
YAML
Raw Normal View History

2024-04-24 18:18:01 +00:00
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
2024-04-24 20:24:47 +00:00
run: GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o bin/collatz-${{ github.ref_name }}-windows-amd64.exe
2024-04-24 18:18:01 +00:00
- name: release-build-linux
2024-04-24 20:24:47 +00:00
run: GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o bin/collatz-${{ github.ref_name }}-linux-amd64
2024-04-24 18:18:01 +00:00
- name: Release
2024-04-24 18:25:08 +00:00
uses: https://gitea.com/actions/release-action@main
2024-04-24 18:18:01 +00:00
with:
files: |-
bin/**
api_key: '${{secrets.RELEASE_TOKEN}}'