diff --git a/.github/workflows/env-vars-configure/action.yml b/.github/workflows/env-vars-configure/action.yml index 2e483ef70041..8d72c048fc9b 100644 --- a/.github/workflows/env-vars-configure/action.yml +++ b/.github/workflows/env-vars-configure/action.yml @@ -28,16 +28,14 @@ runs: run: | # This command retrieves the latest tag that matches the specified channel and package version, # and extracts the version number from the tag name using awk. E.g. retrieves the number 7 from `3.11.0-cloud7`. - # If the channel is tagged as a prerelease, then get the latest prerelease version + # If the channel is tagged as a prerelease, than get the latest prerelease version + # If the channel is not tagged as a prerelease, than get the latest version which is not a prerelease or an rc if [[ "${{ inputs.ADDITION_NAME }}" == "-prerelease" ]]; then CURRENT_CHANNEL_VERSION=$(git ls-remote --tags | grep "\-prerelease" | grep -v "refs/tags/v" | grep "${{ inputs.CHANNEL }}" | grep "${{ env.CLEAN_PACKAGE_VERSION }}" | tail -n1 | awk -F'${{ inputs.CHANNEL }}' '{print $2}' | awk -F'${{ inputs.ADDITION_NAME }}' '{print $1}' || echo 0) else CURRENT_CHANNEL_VERSION=$(git ls-remote --tags | grep -v "\-rc" | grep -v "\-prerelease" | grep -v "refs/tags/v" | grep "${{ inputs.CHANNEL }}" | grep "${{ env.CLEAN_PACKAGE_VERSION }}" | tail -n1 | awk -F'${{ inputs.CHANNEL }}' '{print $2}' || echo 0) fi - # DELETE!!! - echo "CURRENT_CHANNEL_VERSION_CHECK=$CURRENT_CHANNEL_VERSION" - # If value is not a number (e.g. empty string) then set it to 0 if ! [[ $CURRENT_CHANNEL_VERSION =~ ^[0-9]+$ ]]; then CURRENT_CHANNEL_VERSION=0 diff --git a/.github/workflows/one-click-hosting-release.yml b/.github/workflows/one-click-hosting-release.yml index 03bba16ae8cd..c13a58747cc0 100644 --- a/.github/workflows/one-click-hosting-release.yml +++ b/.github/workflows/one-click-hosting-release.yml @@ -42,8 +42,10 @@ jobs: run: | if [ ${{ github.event.inputs.pre_release }} == true ]; then PRE_RELEASE="-prerelease" + echo "This is a prerelease execution" else PRE_RELEASE="" + echo "This is a release execution" fi echo "PRE_RELEASE=${PRE_RELEASE}" >> $GITHUB_ENV - name: Env Vars Configure @@ -87,6 +89,7 @@ jobs: prerelease: ${{ github.event.inputs.pre_release }} body_path: ${{ env.CHANGELOG_FILE }} - name: Post To Slack Created Cloud one click Release + if: ${{ github.event.inputs.pre_release }} == false uses : ./.github/workflows/post-to-slack with: SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }} @@ -98,7 +101,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "Hi All :smile:\n\nWe just Published Could Continues release of *Elementor*\n`${{ env.PACKAGE_VERSION }}`" + "text": "Hi All :smile:\n\nWe just Published Could release of *Elementor*\n`${{ env.PACKAGE_VERSION }}`" } }, {