41 lines
840 B
YAML
41 lines
840 B
YAML
name: Build and upload project release
|
|
|
|
on:
|
|
create:
|
|
tags: [ v* ]
|
|
|
|
jobs:
|
|
|
|
release:
|
|
runs-on: debian-12
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
steps:
|
|
-
|
|
name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Extract Go version
|
|
id: go-version
|
|
run: |
|
|
sed '/^go /!d; s/go /version=/' go.mod >>"$GITHUB_OUTPUT"
|
|
-
|
|
name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ steps.go-version.outputs.version }}
|
|
-
|
|
name: Run tests
|
|
run: |
|
|
make test
|
|
-
|
|
name: Build binaries
|
|
run: |
|
|
make dist-all
|
|
-
|
|
name: Upload release
|
|
uses: actions/forgejo-release@v1
|
|
with:
|
|
direction: upload
|
|
name: binaries
|
|
release-dir: dist/release
|
|
token: ${{ secrets.FORGEJO_TOKEN }}
|