Update .github/workflows/release.yml.OLD
This commit is contained in:
parent
d824dd7b6d
commit
934067a0a3
1 changed files with 0 additions and 0 deletions
60
.github/workflows/release.yml
vendored
60
.github/workflows/release.yml
vendored
|
|
@ -1,60 +0,0 @@
|
|||
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/*
|
||||
Loading…
Reference in a new issue