diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index befedbd..e969c93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,25 @@ on: workflow_dispatch: jobs: + # Gates every publishing job below. A tag that fails here publishes nothing: + # the binaries, the image and the chart are all downstream of it. + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + + - name: Vet + run: go vet ./... + + - name: Test + run: go test ./... + build: + needs: test runs-on: ubuntu-latest strategy: matrix: @@ -44,6 +62,7 @@ jobs: path: terdut-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }} docker: + needs: test runs-on: ubuntu-latest permissions: contents: read @@ -76,6 +95,7 @@ jobs: ghcr.io/yeniklas/terdut-server:${{ github.ref_name }} chart: + needs: test runs-on: ubuntu-latest permissions: contents: write