Skip to content

feat: enhance GoDetector to locate main package and improve build com… #2

feat: enhance GoDetector to locate main package and improve build com…

feat: enhance GoDetector to locate main package and improve build com… #2

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.25"
- name: Test
run: go test ./... -race
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
VERSION=${GITHUB_REF_NAME}
LDFLAGS="-s -w -X github.com/narvanalabs/flkr/cmd.Version=${VERSION}"
go build -ldflags "${LDFLAGS}" -o flkr-${GOOS}-${GOARCH} .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: flkr-${{ matrix.goos }}-${{ matrix.goarch }}
path: flkr-${{ matrix.goos }}-${{ matrix.goarch }}
publish:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Create checksums
working-directory: artifacts
run: sha256sum flkr-* > checksums.txt
- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
artifacts/flkr-*
artifacts/checksums.txt