mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-30 12:16:16 +01:00
38 lines
962 B
YAML
38 lines
962 B
YAML
name: Server Releaser
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
releases-matrix:
|
|
name: Release Go Binary
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
goos: [linux, darwin]
|
|
goarch: [amd64, arm, arm64]
|
|
exclude:
|
|
- goos: darwin
|
|
goarch: arm
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.18
|
|
- name: Build server binary
|
|
run: |
|
|
GOARCH=${{ matrix.goarch }} GOOS=${{ matrix.goos }} go build -o hishtory-server-${{ matrix.goos }}-${{ matrix.goarch }} backend/server/server.go
|
|
- name: Release
|
|
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
with:
|
|
files: |
|
|
hishtory-server-${{ matrix.goos }}-${{ matrix.goarch }}
|