Add Gitea Actions workflow to build and attach Linux release binary
This commit is contained in:
40
.gitea/workflows/release.yml
Normal file
40
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-linux-amd64:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- uses: mlugg/setup-zig@v1
|
||||||
|
with:
|
||||||
|
version: 0.15.2
|
||||||
|
|
||||||
|
- name: Build libghostty-vt
|
||||||
|
run: make deps
|
||||||
|
|
||||||
|
- name: Build patterm
|
||||||
|
env:
|
||||||
|
GOOS: linux
|
||||||
|
GOARCH: amd64
|
||||||
|
CGO_ENABLED: 1
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
go build -trimpath -ldflags="-s -w" \
|
||||||
|
-o dist/patterm-${{ github.ref_name }}-linux-amd64 \
|
||||||
|
./cmd/patterm
|
||||||
|
|
||||||
|
- name: Attach binary to release
|
||||||
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
files: dist/patterm-${{ github.ref_name }}-linux-amd64
|
||||||
Reference in New Issue
Block a user