From 4cc801a7f32a33bbf33d98f1f77d00b742386924 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 29 Jan 2026 10:35:33 +0000 Subject: [PATCH] fix: updated publish pipeline (#3) ## Description relates to #1234 ## Checklist - [ ] Issue was linked above - [ ] Code format was applied: `make fmt` - [ ] Examples were added / adjusted (see `examples/` directory) - [x] Docs are up-to-date: `make generate-docs` (will be checked by CI) - [ ] Unit tests got implemented or updated - [ ] Acceptance tests got implemented or updated (see e.g. [here](https://github.com/stackitcloud/terraform-provider-stackit/blob/f5f99d170996b208672ae684b6da53420e369563/stackit/internal/services/dns/dns_acc_test.go)) - [x] Unit tests are passing: `make test` (will be checked by CI) - [x] No linter issues: `make lint` (will be checked by CI) Reviewed-on: https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/pulls/3 Co-authored-by: Marcel S. Henselin Co-committed-by: Marcel S. Henselin --- .github/workflows/publish.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e5181587..53ab6dff 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,7 +1,6 @@ name: Publish on: - pull_request: workflow_dispatch: push: tags: @@ -15,7 +14,7 @@ env: jobs: config: name: Check GoReleaser config - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/')) runs-on: ubuntu-latest steps: - name: Checkout @@ -28,7 +27,7 @@ jobs: publish: name: "Publish provider" - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/')) needs: config runs-on: ubuntu-latest permissions: @@ -81,6 +80,7 @@ jobs: gpg --import private.key - name: Run GoReleaser + if: github.event_name == 'workflow_dispatch' id: goreleaser env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -89,6 +89,16 @@ jobs: with: args: release --skip publish --clean --snapshot + - name: Run GoReleaser + if: github.event_name != 'workflow_dispatch' + id: goreleaser + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }} + uses: goreleaser/goreleaser-action@v6 + with: + args: release --skip publish --clean + - name: Prepare key file run: | echo $(echo ${{ secrets.KEY_FILE_B64 }} | base64 -d) >public_key.pem