Files
mailcloak/.gitea/workflows/release.yml
peio 6c76e69f63
Some checks failed
release / build (amd64) (push) Failing after 7s
add CI
2026-01-19 00:31:13 +00:00

57 lines
1.2 KiB
YAML

name: release
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64] # [amd64, arm64]
# Build in Alpine => musl toolchain
container:
image: golang:alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deps (musl toolchain)
run: |
apk add --no-cache git build-base musl-dev
- name: Go env
run: |
go version
go env
- name: Build (linux/musl)
env:
GOOS: linux
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: "0"
run: |
mkdir -p dist
BIN="kc-policy-${GOOS}-${GOARCH}-musl"
go build -trimpath \
-ldflags="-s -w" \
-o "dist/${BIN}" ./cmd/kc-policy
tar -C dist -czf "dist/${BIN}.tar.gz" "${BIN}"
sha256sum "dist/${BIN}.tar.gz" > "dist/${BIN}.tar.gz.sha256"
- name: Upload assets to Gitea release
uses: actions/gitea-release-action@v1
with:
token: ${{ github.token }}
files: |
dist/*.tar.gz
dist/*.sha256
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}