Skip to content

Merge pull request #96 from 0xjuanma/feat/own-goal #20

Merge pull request #96 from 0xjuanma/feat/own-goal

Merge pull request #96 from 0xjuanma/feat/own-goal #20

Workflow file for this run

name: Build
on:
push:
tags: ['v*.*.*']
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: darwin
goarch: amd64
extension: ''
- goos: darwin
goarch: arm64
extension: ''
- goos: linux
goarch: amd64
extension: ''
- goos: linux
goarch: arm64
extension: ''
- goos: windows
goarch: amd64
extension: '.exe'
- goos: windows
goarch: arm64
extension: '.exe'
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
go build -ldflags="-s -w -X github.com/0xjuanma/golazo/cmd.Version=${{ github.ref_name }}" -o golazo-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: golazo-${{ matrix.goos }}-${{ matrix.goarch }}
path: golazo-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Upload binaries to release
uses: softprops/action-gh-release@v2
with:
files: dist/*