mirror of
https://github.com/fankes/komari-agent.git
synced 2025-10-18 18:49:23 +08:00
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: Release
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
include:
|
|
- os: ubuntu-latest
|
|
artifact_name: komari-agent-linux-amd64
|
|
goos: linux
|
|
goarch: amd64
|
|
- os: ubuntu-latest
|
|
artifact_name: komari-agent-linux-arm64
|
|
goos: linux
|
|
goarch: arm64
|
|
- os: windows-latest
|
|
artifact_name: komari-agent-windows-amd64.exe
|
|
goos: windows
|
|
goarch: amd64
|
|
- os: windows-latest
|
|
artifact_name: komari-agent-windows-arm64.exe
|
|
goos: windows
|
|
goarch: arm64
|
|
- os: macos-latest
|
|
artifact_name: komari-agent-darwin-amd64
|
|
goos: darwin
|
|
goarch: amd64
|
|
- os: macos-latest
|
|
artifact_name: komari-agent-darwin-arm64
|
|
goos: darwin
|
|
goarch: arm64
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.23'
|
|
|
|
- name: Build
|
|
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ${{ matrix.artifact_name }} .
|
|
|
|
- name: Upload Release Asset
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: ${{ matrix.artifact_name }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |