Refactor release workflow to simplify tagging and remove unnecessary inputs

Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
This commit is contained in:
Matthias Bertschy
2025-12-15 08:08:07 +01:00
parent 2b91023c6b
commit 06241fce03
+4 -30
View File
@@ -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 }}