mirror of
https://github.com/zincsearch/zincsearch.git
synced 2026-10-28 08:36:27 +08:00
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: "24"
|
|
cache: npm
|
|
cache-dependency-path: frontend/package-lock.json
|
|
- run: npm ci
|
|
working-directory: frontend
|
|
- run: npm run build
|
|
working-directory: frontend
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
# Release with the latest Go 1.27 patch, not the older minimum in go.mod.
|
|
# check-latest so a fresh security patch isn't missed while the runner
|
|
# image still caches the previous one.
|
|
go-version: "1.27.x"
|
|
check-latest: true
|
|
- run: sudo apt-get update && sudo apt-get install -y upx-ucl
|
|
- uses: docker/setup-qemu-action@v4
|
|
- uses: docker/setup-buildx-action@v4
|
|
- uses: docker/login-action@v4
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: goreleaser/goreleaser-action@v7
|
|
with:
|
|
distribution: goreleaser
|
|
version: "~> v2"
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
|