Skip to content

Fix dashboard build after Vite asset hash changes. #6

Fix dashboard build after Vite asset hash changes.

Fix dashboard build after Vite asset hash changes. #6

name: Release agent binaries
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: windows
goarch: amd64
asset: trinityproxy-windows-amd64.exe
- goos: linux
goarch: amd64
asset: trinityproxy-linux-amd64
- goos: darwin
goarch: amd64
asset: trinityproxy-darwin-amd64
- goos: darwin
goarch: arm64
asset: trinityproxy-darwin-arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Build agent binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: |
mkdir -p dist
go build -ldflags="-s -w" -trimpath -o "dist/${{ matrix.asset }}" .
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: dist/${{ matrix.asset }}
if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all platform binaries
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: List release files
run: ls -la dist/
- name: Publish continuous pre-release (tag latest)
uses: softprops/action-gh-release@v2
with:
tag_name: latest
name: Latest dev agent binaries
prerelease: true
make_latest: false
generate_release_notes: true
files: dist/*
overwrite_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}