- Update .goreleaser.yaml: - Split builds into linux, windows, and darwin - Configure Zig as the C/C++ compiler for cross-compilation (CGO enabled) - Add zip archive format for Windows - Restrict deb/rpm packages to Linux builds - Update .github/workflows/release-goreleaser.yml: - Add setup-zig action to install Zig compiler - Remove manual apt-get cross-compiler installation
51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
name: Release (GoReleaser)
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25.4'
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24.11.1'
|
|
|
|
- name: Build Frontend
|
|
working-directory: frontend
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Install Cross-Compilation Tools (Zig)
|
|
uses: goto-bus-stop/setup-zig@v2
|
|
with:
|
|
version: 0.13.0
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v5
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.CPMP_TOKEN }}
|
|
# CGO settings are handled in .goreleaser.yaml via Zig
|