From 663d6f82fe7d28e0868f5677702a6d3fb3292d1d Mon Sep 17 00:00:00 2001 From: Rafael <32229014+rafaelbreno@users.noreply.github.com> Date: Thu, 16 Apr 2026 13:52:00 -0300 Subject: [PATCH] Switch release workflow trigger and add draft flag for release creation (#13902) Signed-off-by: Rafael Breno Signed-off-by: Rafael <32229014+rafaelbreno@users.noreply.github.com> --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fad7a1ff944..f3cc87f94c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,9 @@ name: K3s Release on: - release: - types: [published] + push: + tags: + - "v*" permissions: contents: read @@ -194,6 +195,7 @@ jobs: - name: Read Prime artifacts secrets uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3 + if: ${{ github.repository_owner == 'k3s-io' }} with: secrets: | secret/data/github/repo/${{ github.repository }}/prime-artifacts-uploader/credentials accessKeyId | AWS_ACCESS_KEY_ID ; @@ -216,6 +218,7 @@ jobs: - name: Configure AWS Credentials (s3) uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6 + if: ${{ github.repository_owner == 'k3s-io' }} with: aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} @@ -251,6 +254,7 @@ jobs: - name: Upload Assets to Release uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 with: + draft: true files: | dist/artifacts/k3s* dist/artifacts/sha256sum* @@ -258,11 +262,13 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update Image Registry for Prime/Staging + if: ${{ github.repository_owner == 'k3s-io' }} env: REGISTRY: ${{ env.REGISTRY }} run: sed -i "s|docker.io|${REGISTRY}|g" dist/artifacts/k3s-images.txt - name: Upload Assets to S3 + if: ${{ github.repository_owner == 'k3s-io' }} env: S3_PATH: s3://${{ env.PRIME_ARTIFACTS_BUCKET_NAME }}/k3s/${{ github.event.release.tag_name }} run: |