build relay for all platforms #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build relay for all platforms | |
on: | |
push: | |
tags: | |
- "*" | |
permissions: | |
contents: write | |
jobs: | |
make-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install build-essential and LMDB development files | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential liblmdb-dev | |
- name: Create Release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: ${{ github.ref_name }} | |
continue-on-error: true | |
build-all-for-all: | |
runs-on: ubuntu-latest | |
needs: | |
- make-release | |
strategy: | |
matrix: | |
goos: [linux, freebsd, darwin, windows] | |
goarch: [amd64, arm64, riscv64] | |
exclude: | |
- goarch: arm64 | |
goos: windows | |
- goarch: riscv64 | |
goos: windows | |
- goarch: riscv64 | |
goos: darwin | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install build-essential and LMDB development files | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential liblmdb-dev | |
- name: Set CGO_ENABLED=1 | |
run: | | |
export CGO_ENABLED=1 | |
- name: Build application with Go | |
run: | | |
go env # Print Go environment details for debugging | |
go build ./... | |
- uses: wangyoucao577/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
goos: ${{ matrix.goos }} | |
goarch: ${{ matrix.goarch }} | |
overwrite: true | |
md5sum: false | |
sha256sum: false | |
compress_assets: false |