mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2024-12-23 20:19:28 +00:00
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
name: "Release Binaries"
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
build_binaries:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
goos: [linux]
|
|
goarch: [amd64, arm64]
|
|
|
|
steps:
|
|
- name: Check out source code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.22.x
|
|
|
|
- name: Setup templ
|
|
run: go install github.com/a-h/templ/cmd/templ@v0.2.778
|
|
|
|
# Need to build the UI here before build the server binary with go-release-action
|
|
- name: Prepare assets
|
|
run: make prepare templ tailwind
|
|
|
|
- name: Build server binary
|
|
uses: wangyoucao577/go-release-action@v1
|
|
with:
|
|
github_token: ${{ secrets.ACTION_TOKEN }}
|
|
goos: ${{ matrix.goos }}
|
|
goarch: ${{ matrix.goarch }}
|
|
overwrite: true
|
|
pre_command: export CGO_ENABLED=0
|
|
ldflags: -s -w -X github.com/ditatompel/xmr-remote-nodes/internal/config.Version=${{github.ref_name}}
|
|
build_flags: -tags server
|
|
project_path: .
|
|
binary_name: server
|
|
extra_files: LICENSE README.md
|
|
|
|
- name: Build client binary
|
|
uses: wangyoucao577/go-release-action@v1
|
|
with:
|
|
github_token: ${{ secrets.ACTION_TOKEN }}
|
|
goos: ${{ matrix.goos }}
|
|
goarch: ${{ matrix.goarch }}
|
|
overwrite: true
|
|
pre_command: export CGO_ENABLED=0
|
|
ldflags: -s -w -X github.com/ditatompel/xmr-remote-nodes/internal/config.Version=${{github.ref_name}}
|
|
binary_name: client
|
|
project_path: .
|
|
extra_files: LICENSE README.md
|