forked from Comcast/fishymetrics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add automatic release on tag with automatic build
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |