Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/actions/upload-packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
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
7 changes: 4 additions & 3 deletions .github/workflows/release_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,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.
Expand Down Expand Up @@ -72,11 +72,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
Expand Down
Loading