From 52878b97c6b0279ef19ab67c680c83104db9b1a1 Mon Sep 17 00:00:00 2001 From: Thomas Cooper Date: Mon, 20 Feb 2023 19:00:38 -0500 Subject: [PATCH] run release only if build/test succeeds another goreleaser fix --- .github/workflows/release.yml | 4 ++++ .goreleaser.yml | 2 +- Makefile | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e310eef..0bd52e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,12 @@ on: push: tags: - "v*" + workflow_run: + workflows: [build/test] + types: [completed] jobs: goreleaser: + if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest steps: - diff --git a/.goreleaser.yml b/.goreleaser.yml index 95da4e0..7509d45 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -8,7 +8,7 @@ before: - go generate ./... builds: - main: ./cmd/kube-role-gen/ - - env: + env: - CGO_ENABLED=0 goos: - linux diff --git a/Makefile b/Makefile index c9da322..295847a 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ build: $(TARGET) test: go test ./... -e2e: test +e2e: tests/e2e_tests.sh clean: