release / build-linux-amd64 (push) Successful in 13m7s
`mlugg/setup-zig` was chasing mirrors for ~4 minutes on every run (see v0.0.1 / v0.0.2 logs) and `actions/setup-go` was spending another ~4 minutes downloading Go before patterm started building. mise already manages the project's zig pin; adding `go = "1.26.3"` to `.mise.toml` (matching go.mod) lets `jdx/mise-action@v2` install both with one cached step. Subsequent runs reuse the mise cache instead of re-resolving mirror URLs and re-downloading toolchains. Also adds an `actions/cache@v4` step for `~/.cache/go-build` and `~/go/pkg/mod` keyed on `go.sum` so `go build` itself doesn't re-pull modules every tag push.
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build-linux-amd64:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: jdx/mise-action@v2
|
|
with:
|
|
cache: true
|
|
|
|
- name: Cache Go modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- 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 -X main.version=${{ github.ref_name }}" \
|
|
-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
|