add release flow
All checks were successful
judge / Build judge (push) Successful in 10s
Release / Build & publish (push) Successful in 10s
judge / Linux / gcc / Debug (push) Successful in 9s
judge / Linux / clang / Release (push) Successful in 11s
judge / Linux / gcc / Release (push) Successful in 11s
judge / Linux / clang / Sanitized (push) Successful in 10s
judge / Linux / gcc / Sanitized (push) Successful in 10s
judge / Linux / gcc / Debug (valgrind) (push) Successful in 24s
judge / Windows / clang / Debug (push) Successful in 33s
judge / Windows / clang / Release (push) Successful in 39s
judge / Windows / msvc / Debug (push) Successful in 43s
judge / Windows / msvc / Release (push) Successful in 42s
judge / SUMMARY (push) Successful in 4s
All checks were successful
judge / Build judge (push) Successful in 10s
Release / Build & publish (push) Successful in 10s
judge / Linux / gcc / Debug (push) Successful in 9s
judge / Linux / clang / Release (push) Successful in 11s
judge / Linux / gcc / Release (push) Successful in 11s
judge / Linux / clang / Sanitized (push) Successful in 10s
judge / Linux / gcc / Sanitized (push) Successful in 10s
judge / Linux / gcc / Debug (valgrind) (push) Successful in 24s
judge / Windows / clang / Debug (push) Successful in 33s
judge / Windows / clang / Release (push) Successful in 39s
judge / Windows / msvc / Debug (push) Successful in 43s
judge / Windows / msvc / Release (push) Successful in 42s
judge / SUMMARY (push) Successful in 4s
This commit is contained in:
37
.gitea/workflows/release.yml
Normal file
37
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build & publish
|
||||
runs-on: Linux-Runner
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.22'
|
||||
|
||||
- name: Cross-compile
|
||||
shell: bash
|
||||
run: |
|
||||
tag="${GITHUB_REF#refs/tags/}"
|
||||
mkdir -p dist
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o "dist/judge-linux-amd64" ./cmd/cli
|
||||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o "dist/judge-windows-amd64.exe" ./cmd/cli
|
||||
ls -la dist/
|
||||
|
||||
- name: Create release
|
||||
uses: https://gitea.com/actions/gitea-release-action@main
|
||||
with:
|
||||
files: |-
|
||||
dist/judge-linux-amd64
|
||||
dist/judge-windows-amd64.exe
|
||||
api_key: ${{ secrets.RELEASE_TOKEN }}
|
||||
title: ${{ github.ref_name }}
|
||||
Reference in New Issue
Block a user