From 98b8cfb2331b12e643eff7090656dd7756b79c73 Mon Sep 17 00:00:00 2001 From: Armin Becher Date: Thu, 4 Jan 2024 23:03:13 +0100 Subject: [PATCH] build: split test and release pipeline --- .github/workflows/main.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fafc36e..0ad213f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,9 +34,8 @@ jobs: with: version: v1.54 args: --tests=false --timeout=10m - test-and-release: + test: runs-on: ubuntu-latest - needs: [check-links] steps: - name: Checkout uses: actions/checkout@v3 @@ -46,9 +45,19 @@ jobs: go-version: "1.21" - name: Test run: go test ./... + release: + runs-on: ubuntu-latest + needs: [check-links, test] + if: startsWith(github.ref, 'refs/tags/') + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.21" - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 - if: startsWith(github.ref, 'refs/tags/') with: version: latest args: release --rm-dist