Skip to content

v0.1.0

v0.1.0 #5

Workflow file for this run

name: Build & Upload Release Binaries
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: arm64
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25.x'
cache: true
- name: Verify module & run tests
run: |
go mod tidy
go test ./... -race -cover
- name: Build ${{ matrix.goos }}/${{ matrix.goarch }}
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
mkdir -p dist
BIN_NAME=json-to-properties
OUT="dist/${BIN_NAME}_${GOOS}_${GOARCH}"
# Build (strip symbols, reproducible-ish)
go build -trimpath -ldflags="-s -w" -o "$OUT" ./...
- name: Upload assets to the release
uses: softprops/action-gh-release@v2
with:
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}