Skip to content

yaml

yaml #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: Build binaries
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
suffix: ""
- goos: windows
goarch: amd64
suffix: ".exe"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
go build -trimpath -tags timetzdata -ldflags="-s -w" \
-o gorillo-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }} \
./cmd/gorillo
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gorillo-${{ matrix.goos }}-${{ matrix.goarch }}
path: gorillo-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }}
release:
name: Create release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- uses: softprops/action-gh-release@v2
with:
files: gorillo-*