forked from elementor/elementor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from davseve/internal/ED-11261-one-click-clou…
…d-release Replace prerelease with test postfix [ED-11261]
- Loading branch information
Showing
6 changed files
with
185 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "Hi All :smile:\n\nWe just Published Could release of *Elementor*\n`${{ env.PACKAGE_VERSION }}`" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "GitHub Release *${{ env.PACKAGE_VERSION }}* \nCreated by ${{ github.actor }}" | ||
}, | ||
"accessory": { | ||
"type": "button", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "Open :point_left:", | ||
"emoji": true | ||
}, | ||
"value": "open-release", | ||
"url": "https://github.com/${{ github.repository }}/releases/tag/${{ env.PACKAGE_VERSION }}", | ||
"action_id": "button-action" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*v${{ env.PACKAGE_VERSION }} Changelog* \n\n ${{ env.CHANGELOG_CONTENT }}" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: One Click Hosting Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pre_release: | ||
type: boolean | ||
description: 'Pre-release?' | ||
default: true | ||
required: false | ||
branches: | ||
- main | ||
env: | ||
CHANNEL: 'cloud' | ||
CHANGELOG_FILE: 'temp-changelog.txt' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: checkout branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Get Configuration | ||
id: configuration | ||
uses: maork-elementor/json-to-variables@main | ||
with: | ||
filename: './.github/workflows/config.json' | ||
prefix: config | ||
- name: Test permissions | ||
uses: ./.github/workflows/permissions | ||
with: | ||
ENVIRONMENT: ${{ env.config_deployment_environment }} | ||
DEPLOYMENT_PERMITTED: ${{ env.config_deployment_permitted }} | ||
DEPLOYMENT_REPOSITORY_OWNER: ${{ env.config_deployment_repository_owner }} | ||
- name: Install Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- name: Is pre-release? | ||
id: is_pre_release | ||
run: | | ||
if [ ${{ github.event.inputs.pre_release }} == true ]; then | ||
POSTFIX="-test" | ||
echo "This is a prerelease execution" | ||
else | ||
POSTFIX="" | ||
echo "This is a release execution" | ||
fi | ||
echo "POSTFIX=${POSTFIX}" >> $GITHUB_ENV | ||
- name: Env Vars Configure | ||
uses: ./.github/workflows/env-vars-configure | ||
with: | ||
CHANNEL: ${{ env.CHANNEL }} | ||
REF: ${{ github.ref }} | ||
POSTFIX: ${{ env.POSTFIX }} | ||
- name: Bump Channel Version | ||
uses: ./.github/workflows/bump-channel-version | ||
with: | ||
CLEAN_PACKAGE_VERSION: ${{ env.CLEAN_PACKAGE_VERSION }} | ||
CHANNEL: ${{ env.CHANNEL }} | ||
OVERRIDE_PACKAGE_VERSION: true | ||
POSTFIX: ${{ env.POSTFIX }} | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Build plugin | ||
uses: ./.github/workflows/build-plugin | ||
with: | ||
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} | ||
BUILD_SCRIPT_PATH: "./.github/scripts/build-zip.sh" | ||
- name: Generate changelog | ||
uses : ./.github/workflows/generate-changelog | ||
with: | ||
TOKEN: ${{ secrets.MAINTAIN_TOKEN }} | ||
REPOSITORY: ${{ github.repository }} | ||
HEAD_BRANCH_NAME: ${{ github.ref }} | ||
BASE_TAG_NAME: ${{ env.PREVIOUS_TAG_SHA }} | ||
GENERATE_EMPTY_CHANGELOG: true | ||
- name: Create GitHub release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ env.PACKAGE_VERSION }} | ||
target_commitish: ${{ env.CLEAN_REF }} | ||
files: | | ||
elementor-*.zip | ||
${{ env.CHANGELOG_FILE }} | ||
# Will be removed once we see that the release is working | ||
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 }} | ||
SLACK_TAG_CHANNELS: ${{ secrets.SLACK_CHANNEL_RELEASEBOT }} | ||
PAYLOAD: "$(cat ./.github/scripts/slack-channel-cloud-message.json)" |