Files
gpt-load/.github/workflows/release-linux.yml
T

43 lines
1.2 KiB
YAML

name: Release Linux Build
permissions:
contents: write
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Validate and build web UI
uses: ./.github/actions/web-ci
- name: Setup Go
uses: actions/setup-go@v7
with:
go-version: "1.25.x"
cache: true
cache-dependency-path: go.sum
- name: Build Backend for amd64
run: |
go mod download
go build -ldflags "-s -w -X gpt-load/internal/platform/version.Version=${{ github.ref_name }}" -o gpt-load-linux-amd64
- name: Build Backend for arm64
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -X gpt-load/internal/platform/version.Version=${{ github.ref_name }}" -o gpt-load-linux-arm64
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
gpt-load-linux-amd64
gpt-load-linux-arm64
draft: true
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}