Skip to content
Merged
Show file tree
Hide file tree
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
50 changes: 50 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and upload artifacts (linux/amd64 and darwin/arm64)

on:
push:
branches: ["**"]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
- goos: darwin
goarch: arm64

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true

- name: Download dependencies
run: go get ./...

- name: Build (${{ matrix.goos }}-${{ matrix.goarch }})
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: |
mkdir -p dist
echo "Building for $GOOS/$GOARCH"
out="dist/csvdiff-${GOOS}-${GOARCH}"
go build -o "$out"

- name: Upload artifact (${{ matrix.goos }}-${{ matrix.goarch }})
uses: actions/upload-artifact@v4
with:
name: csvdiff-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/csvdiff-${{ matrix.goos }}-${{ matrix.goarch }}
if-no-files-found: error
retention-days: 14
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ require (
github.com/stretchr/testify v1.8.4
)

go 1.13
go 1.25.4