nxstats/.github/workflows/release.yml.OLD
mr0xb 934067a0a3
Some checks failed
Release / tag (push) Has been cancelled
Release / build-and-release (push) Has been cancelled
Update .github/workflows/release.yml.OLD
2026-08-26 21:37:38 -04:00

60 lines
1.3 KiB
YAML

name: Release
on:
push:
branches:
- main
permissions:
contents: write
concurrency:
group: release
cancel-in-progress: false
jobs:
tag:
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag.outputs.new_tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version and push tag
id: tag
uses: anothrNick/github-tag-action@1.71.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
build-and-release:
needs: tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ needs.tag.outputs.new_tag }}
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build release binaries
run: make build
- name: Install UPX
run: sudo apt-get update && sudo apt-get install -y upx-ucl
- name: Compress Linux binaries
run: upx --best --lzma dist/*-linux-*
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.tag.outputs.new_tag }}
generate_release_notes: true
files: dist/*