From 06241fce0350b825dc9e6f8f461ebf15b87b3f03 Mon Sep 17 00:00:00 2001 From: Matthias Bertschy Date: Mon, 15 Dec 2025 08:08:07 +0100 Subject: [PATCH] Refactor release workflow to simplify tagging and remove unnecessary inputs Signed-off-by: Matthias Bertschy --- .github/workflows/02-release.yaml | 34 ++++--------------------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/.github/workflows/02-release.yaml b/.github/workflows/02-release.yaml index 77404892..c71dda30 100644 --- a/.github/workflows/02-release.yaml +++ b/.github/workflows/02-release.yaml @@ -3,7 +3,7 @@ permissions: read-all on: push: tags: - - "v*.*.*-rc.*" + - "v[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: inputs: skip_publish: @@ -11,28 +11,7 @@ on: required: false default: true type: boolean - skip_system_tests: - description: "Skip system tests (intended for hotfix releases)" - required: false - default: false - type: boolean - release_tag: - description: "Release tag to simulate (must contain -rc, e.g. v0.0.0-rc.0)" - required: false - default: "v0.0.0-rc.0" - type: string jobs: - retag: - outputs: - NEW_TAG: ${{ steps.tag-calculator.outputs.NEW_TAG }} - runs-on: ubuntu-large - steps: - - uses: actions/checkout@v4 - - id: tag-calculator - uses: ./.github/actions/tag-action - with: - ORIGINAL_TAG: ${{ inputs.release_tag != '' && inputs.release_tag || github.ref_name }} - SUB_STRING: "-rc" release: permissions: actions: read @@ -51,7 +30,6 @@ jobs: security-events: read attestations: read artifact-metadata: read - needs: [retag] runs-on: ubuntu-large steps: - uses: actions/checkout@v4 @@ -83,10 +61,6 @@ jobs: - name: Create Cosign Key run: echo "${{ secrets.COSIGN_PRIVATE_KEY_V1 }}" > cosign.key - - name: Tag Release - run: | - git tag ${{ needs.retag.outputs.NEW_TAG }} - - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -113,13 +87,13 @@ jobs: with: distribution: goreleaser version: latest - args: release --clean --tag ${{ needs.retag.outputs.NEW_TAG }} ${{ inputs.skip_publish == true && '--skip=publish' || '' }} + args: release --clean ${{ inputs.skip_publish == true && '--skip=publish' || '' }} env: GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }} COSIGN_PWD: ${{ secrets.COSIGN_PRIVATE_KEY_V1_PASSWORD }} - RELEASE: ${{ needs.retag.outputs.NEW_TAG }} + RELEASE: ${{ github.ref_name }} CLIENT: release - RUN_E2E: ${{ inputs.skip_system_tests == true && 'false' || 'true' }} + RUN_E2E: "true" KUBESCAPE_SKIP_UPDATE_CHECK: "true" CUSTOMER: ${{ secrets.CUSTOMER }} USERNAME: ${{ secrets.USERNAME }}