From 19f12f94c027373e86babb6459e04b65f5637976 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 5 Dec 2022 09:10:51 +0100 Subject: [PATCH] Make goreleaser use Nix Eliminate one more place to make sure we use the same go version Signed-off-by: Kristoffer Dalby --- .github/workflows/release.yml | 20 +++++--------------- flake.nix | 1 + 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec015180..d135241d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,27 +9,17 @@ on: jobs: goreleaser: - runs-on: ubuntu-18.04 # due to CGO we need to user an older version + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.19.0 - - name: Install dependencies - run: | - sudo apt update - sudo apt install -y gcc-aarch64-linux-gnu - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - distribution: goreleaser - version: latest - args: release --rm-dist + - uses: cachix/install-nix-action@v16 + + - name: Run goreleaser + run: nix develop --command -- goreleaser release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/flake.nix b/flake.nix index e43b30a7..5202cccd 100644 --- a/flake.nix +++ b/flake.nix @@ -109,6 +109,7 @@ golangci-lint golines nodePackages.prettier + goreleaser # Protobuf dependencies protobuf