File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed
Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 88 release_type :
99 description : " Type of release to upload (public, internal)"
1010 required : true
11+ release_tag :
12+ description : ' Release tag to publish'
13+ required : true
1114 gh_token :
1215 description : " GitHub token"
1316 required : true
@@ -20,8 +23,8 @@ inputs:
2023 BREW_S3_REGION :
2124 description : " S3 region to upload to"
2225 required : false
23- cask :
24- description : ' Cask to publish '
26+ channel :
27+ description : ' Type of stability (stable, rc) '
2528 required : true
2629
2730outputs :
3942 echo "Invalid release_type: ${{ inputs.release_type }}"
4043 exit 1
4144 fi
45+ if [ "${{ inputs.channel }}" != "stable" ] && [ "${{ inputs.channel }}" != "rc" ]; then
46+ echo "Invalid channel: ${{ inputs.channel }}"
47+ exit 1
48+ fi
4249 if [ -z "${{ inputs.BREW_S3_BUCKET }}" ] || [ -z "${{ inputs.BREW_S3_REGION }}" ] || [ -z "${{ inputs.BREW_S3_IAM_ARN }}" ]; then
4350 echo "Missing required inputs for S3 bucket and region"
4451 exit 1
8996 - name : Edit cask file
9097 shell : bash
9198 run : |
92- ${{ github.action_path }}/../common/edit-cask.sh --cask ${{ inputs.cask }} --action publish --package-json $packages_sha256_json --tap ${{ inputs.tap }} ${{ inputs.redis_version }}
99+ if [ "${{ inputs.channel }}" == "stable" ]; then
100+ ${{ github.action_path }}/../common/edit-cask.sh --cask redis --action publish --package-json "$packages_sha256_json" ${{ inputs.release_tag }}
101+ ${{ github.action_path }}/../common/edit-cask.sh --cask redis-rc --action publish --package-json "$packages_sha256_json" ${{ inputs.release_tag }}
102+ elif [ "${{ inputs.channel }}" == "rc" ]; then
103+ ${{ github.action_path }}/../common/edit-cask.sh --cask redis-rc --action publish --package-json "$packages_sha256_json" ${{ inputs.release_tag }}
104+ fi
Original file line number Diff line number Diff line change 11# This workflow is part of the Redis OSS release automation process.
22on :
3+ push :
4+ branches :
5+ - release_automation
36 workflow_dispatch :
47 inputs :
58 release_tag :
1417 release_handle :
1518 description : ' JSON string containing release handle information'
1619 required : true
17- cask :
18- description : ' Cask to publish '
20+ channel :
21+ description : ' Type of stability (stable, rc) '
1922 required : true
2023
2124# UUID is used to help automation to identify workflow run in the list of workflow runs.
@@ -72,11 +75,12 @@ jobs:
7275 with :
7376 run_id : ${{ steps.parse-handle.outputs.run_id }}
7477 release_type : ${{ github.event.inputs.release_type }}
78+ release_tag : ${{ github.event.inputs.release_tag }}
7579 gh_token : ${{ secrets.GITHUB_TOKEN }}
80+ channel : ${{ inputs.channel }}
7681 BREW_S3_REGION : ${{ github.event.inputs.release_type == 'public' && secrets.S3_REGION || secrets.S3_REGION_STAGING }}
7782 BREW_S3_BUCKET : ${{ github.event.inputs.release_type == 'public' && secrets.S3_BUCKET || secrets.S3_BUCKET_STAGING }}
7883 BREW_S3_IAM_ARN : ${{ github.event.inputs.release_type == 'public' && secrets.S3_IAM_ARN || secrets.S3_IAM_ARN_STAGING }}
79- cask : ${{ inputs.cask }}
8084
8185 - name : Merge back to release branch
8286 id : merge-back
You can’t perform that action at this time.
0 commit comments