From 29a7e97c963839df58c098d08d6f6a1cb11c584e Mon Sep 17 00:00:00 2001 From: Andrew Farries Date: Mon, 9 Dec 2024 08:51:44 +0000 Subject: [PATCH] WIP: Add job to test x-platform builds --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eee4b8dc..0501f16e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,39 @@ permissions: contents: write packages: write jobs: + cross-build: + name: cross-platform build + runs-on: ubuntu-24.04 + container: + image: surjection/goreleaser-cross:v1.23-v2.4.8 + env: + DOCKER_CLI_EXPERIMENTAL: "enabled" + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - run: git config --global --add safe.directory $GITHUB_WORKSPACE + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: build --snapshot + + - uses: actions/upload-artifact@v4 + with: + name: platform-binaries + path: dist/ + if-no-files-found: error + test: name: 'test (pg: ${{ matrix.pgVersion }}, schema: ${{ matrix.testSchema }})' runs-on: ubuntu-latest