Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
release:
types: [published]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
suffix: ""
- goos: linux
goarch: arm64
suffix: ""
- goos: windows
goarch: amd64
suffix: ".exe"
- goos: windows
goarch: arm64
suffix: ".exe"
- goos: darwin
goarch: amd64
suffix: ""
- goos: darwin
goarch: arm64
suffix: ""
steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version: stable

- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: go build -trimpath -ldflags="-s -w" -o ruok-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }} .

- name: Upload binary to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload "${{ github.event.release.tag_name }}" ruok-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }}