From a1f01becced3add772a87565db89e518776cb65c Mon Sep 17 00:00:00 2001 From: Misha Hawthorn Date: Sun, 23 Nov 2025 19:55:54 -0600 Subject: [PATCH 1/3] Add GitHub Actions workflow for building and uploading artifacts on Linux (amd64) and macOS (arm64), and update Go version to 1.24.1 --- .github/workflows/build.yml | 51 +++++++++++++++++++++++++++++++++++++ go.mod | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cbf3695 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,51 @@ +name: Build and upload artifacts (linux/amd64 and darwin/arm64) + +on: + push: + branches: ["**"] + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-20.04 + 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 diff --git a/go.mod b/go.mod index cc578a2..945c18a 100644 --- a/go.mod +++ b/go.mod @@ -11,4 +11,4 @@ require ( github.com/stretchr/testify v1.8.4 ) -go 1.13 +go 1.24.1 From 882dcf16f2ac8e21ace1cf92870783e63de5104d Mon Sep 17 00:00:00 2001 From: Misha Hawthorn Date: Sun, 23 Nov 2025 20:01:23 -0600 Subject: [PATCH 2/3] Use ubuntu latest --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbf3695..57a6dc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: From 173e262fe8f37b6b7535870bff639e6463d433ad Mon Sep 17 00:00:00 2001 From: Misha Hawthorn Date: Sun, 23 Nov 2025 20:05:42 -0600 Subject: [PATCH 3/3] Update Go version to 1.25.4 and remove pull_request trigger in GitHub Actions workflow --- .github/workflows/build.yml | 1 - go.mod | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57a6dc3..ff42246 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,6 @@ name: Build and upload artifacts (linux/amd64 and darwin/arm64) on: push: branches: ["**"] - pull_request: workflow_dispatch: jobs: diff --git a/go.mod b/go.mod index 945c18a..8e84de7 100644 --- a/go.mod +++ b/go.mod @@ -11,4 +11,4 @@ require ( github.com/stretchr/testify v1.8.4 ) -go 1.24.1 +go 1.25.4