From 5b447dde13a39757b8b3e8a4209b1adb55b45d28 Mon Sep 17 00:00:00 2001 From: Daria Guy Date: Thu, 20 Nov 2025 11:50:07 +0200 Subject: [PATCH 1/2] Added channel input --- .github/actions/upload-packages/action.yml | 18 +++++++++++++++--- .github/workflows/release_publish.yml | 10 +++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/actions/upload-packages/action.yml b/.github/actions/upload-packages/action.yml index c88f4cf..d928915 100644 --- a/.github/actions/upload-packages/action.yml +++ b/.github/actions/upload-packages/action.yml @@ -8,6 +8,9 @@ inputs: release_type: description: "Type of release to upload (public, internal)" required: true + release_tag: + description: 'Release tag to publish' + required: true gh_token: description: "GitHub token" required: true @@ -20,8 +23,8 @@ inputs: BREW_S3_REGION: description: "S3 region to upload to" required: false - cask: - description: 'Cask to publish' + channel: + description: 'Type of stability (stable, rc)' required: true outputs: @@ -39,6 +42,10 @@ runs: echo "Invalid release_type: ${{ inputs.release_type }}" exit 1 fi + if [ "${{ inputs.channel }}" != "stable" ] && [ "${{ inputs.channel }}" != "rc" ]; then + echo "Invalid channel: ${{ inputs.channel }}" + exit 1 + fi if [ -z "${{ inputs.BREW_S3_BUCKET }}" ] || [ -z "${{ inputs.BREW_S3_REGION }}" ] || [ -z "${{ inputs.BREW_S3_IAM_ARN }}" ]; then echo "Missing required inputs for S3 bucket and region" exit 1 @@ -89,4 +96,9 @@ runs: - name: Edit cask file shell: bash run: | - ${{ github.action_path }}/../common/edit-cask.sh --cask ${{ inputs.cask }} --action publish --package-json $packages_sha256_json --tap ${{ inputs.tap }} ${{ inputs.redis_version }} \ No newline at end of file + if [ "${{ inputs.channel }}" == "stable" ]; then + ${{ github.action_path }}/../common/edit-cask.sh --cask redis --action publish --package-json "$packages_sha256_json" ${{ inputs.release_tag }} + ${{ github.action_path }}/../common/edit-cask.sh --cask redis-rc --action publish --package-json "$packages_sha256_json" ${{ inputs.release_tag }} + elif [ "${{ inputs.channel }}" == "rc" ]; then + ${{ github.action_path }}/../common/edit-cask.sh --cask redis-rc --action publish --package-json "$packages_sha256_json" ${{ inputs.release_tag }} + fi diff --git a/.github/workflows/release_publish.yml b/.github/workflows/release_publish.yml index 7f1bc77..9307893 100644 --- a/.github/workflows/release_publish.yml +++ b/.github/workflows/release_publish.yml @@ -1,5 +1,8 @@ # This workflow is part of the Redis OSS release automation process. on: + push: + branches: + - release_automation workflow_dispatch: inputs: release_tag: @@ -14,8 +17,8 @@ on: release_handle: description: 'JSON string containing release handle information' required: true - cask: - description: 'Cask to publish' + channel: + description: 'Type of stability (stable, rc)' required: true # UUID is used to help automation to identify workflow run in the list of workflow runs. @@ -72,11 +75,12 @@ jobs: with: run_id: ${{ steps.parse-handle.outputs.run_id }} release_type: ${{ github.event.inputs.release_type }} + release_tag: ${{ github.event.inputs.release_tag }} gh_token: ${{ secrets.GITHUB_TOKEN }} + channel: ${{ inputs.channel }} BREW_S3_REGION: ${{ github.event.inputs.release_type == 'public' && secrets.S3_REGION || secrets.S3_REGION_STAGING }} BREW_S3_BUCKET: ${{ github.event.inputs.release_type == 'public' && secrets.S3_BUCKET || secrets.S3_BUCKET_STAGING }} BREW_S3_IAM_ARN: ${{ github.event.inputs.release_type == 'public' && secrets.S3_IAM_ARN || secrets.S3_IAM_ARN_STAGING }} - cask: ${{ inputs.cask }} - name: Merge back to release branch id: merge-back From 3a9f8c0ef4e7a09f673d3be25fb7baf753b5f07b Mon Sep 17 00:00:00 2001 From: Daria Guy Date: Thu, 20 Nov 2025 11:50:56 +0200 Subject: [PATCH 2/2] Remove push trigger in release_publish --- .github/workflows/release_publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release_publish.yml b/.github/workflows/release_publish.yml index 9307893..3bcb98e 100644 --- a/.github/workflows/release_publish.yml +++ b/.github/workflows/release_publish.yml @@ -1,8 +1,5 @@ # This workflow is part of the Redis OSS release automation process. on: - push: - branches: - - release_automation workflow_dispatch: inputs: release_tag: