Skip to content

Commit

Permalink
pre release condition step added [ed-11261]
Browse files Browse the repository at this point in the history
  • Loading branch information
davseve committed Jul 24, 2023
1 parent 58b6611 commit 823a846
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/env-vars-configure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ runs:
uses : ./.github/workflows/get-previous-release
with:
CHANNEL: ${{ inputs.CHANNEL }}
ADDITION_NAME: ${{ inputs.ADDITION_NAME }}
7 changes: 5 additions & 2 deletions .github/workflows/get-previous-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
CHANNEL:
required: true
description: "The channel to get the version to (ga, cloud, beta)."
ADDITION_NAME:
required: false
description: "The addition name to add to the package version -rc / -pre."

runs:
using: "composite"
Expand All @@ -13,11 +16,11 @@ runs:
run: |
# If the channel is either "cloud" or "beta", fetch all Git tags matching the channel pattern,
# excluding any "-rc" tags, and store them in the 'tags' variable. e.g. "refs/tags/v3.11.0-cloud1 , refs/tags/v3.11.0-cloud2"
if [[ ${{ inputs.CHANNEL }} == "cloud" || ${{ inputs.CHANNEL }} == "beta" && ${{ env.ADDITION_NAME }} == "-prerelease" ]]; then
if [[ ${{ inputs.CHANNEL }} == "cloud" || ${{ inputs.CHANNEL }} == "beta" && ${{ inputs.ADDITION_NAME }} == "-prerelease" ]]; then
tags=$(git ls-remote --tags | grep ${{ inputs.CHANNEL }} | grep -v "\-rc" | awk '{print $2}')
fi
if [[ ${{ inputs.CHANNEL }} == "cloud" && ${{ env.ADDITION_NAME }} == "-prerelease" ]]; then
if [[ ${{ inputs.CHANNEL }} == "cloud" && ${{ inputs.ADDITION_NAME }} == "-prerelease" ]]; then
tags=$(git ls-remote --tags | grep ${{ inputs.CHANNEL }} | grep "\-prerelease" | awk '{print $2}')
fi
Expand Down

0 comments on commit 823a846

Please sign in to comment.