Skip to content

Commit

Permalink
ci: add automatic release on tag with automatic build
Browse files Browse the repository at this point in the history
This will provide a pre-build binary, useful in some cases
  • Loading branch information
Arno DUBOIS committed Jan 21, 2025
1 parent fb6d814 commit 0e9b082
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "create release"

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup golang environment
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Install dependencies
run: go mod tidy

- name: Make sure app can build
run: make build

- name: Rename executable
shell: bash
run: |
mv build/usr/bin/fishymetrics build/usr/bin/fishymetrics-linux-amd64
for filename in *.log; do
[ -e "$filename" ] || continue;
sha256sum "$filename" >> checksum.txt;
done
- name: Release
uses: softprops/action-gh-release@v2
with:
files: build/usr/bin/*

0 comments on commit 0e9b082

Please sign in to comment.