-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use stable vscode version for releases
Signed-off-by: Mykhailo Kuznietsov <[email protected]>
- Loading branch information
1 parent
e7d3a32
commit c270639
Showing
2 changed files
with
20 additions
and
75 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -16,6 +16,10 @@ on: | |
description: 'The version that is going to be released. Should be in format 7.y.z' | ||
required: true | ||
default: '7.y.z' | ||
mode: | ||
description: 'Workflow mode. Use 'rebase' to only prepare release branch with rebase to stable version of vscode,'release' to perform release without preparing the branch, and 'all' to perform both rebase and release | ||
required: true | ||
default: '7.y.z' | ||
forceRecreateTags: | ||
description: If true, tags will be recreated. Use with caution | ||
required: false | ||
|
@@ -53,23 +57,27 @@ jobs: | |
else | ||
echo "[INFO] No existing tags detected for $VERSION" | ||
fi | ||
- name: "Prepare release branch" | ||
if: {{ github.event.inputs.mode }} == all || {{ github.event.inputs.mode }} == rebase | ||
run: | | ||
VSCODE_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1) ) | ||
BRANCH=upstream-release/${VSCODE_VERSION%.*} | ||
# TODO verify that branch is indeed following `1.[0-9]*.x` format | ||
NEAREST_REBASE_COMMIT_SHA=$(git rev-list --author="Eclipse Che Sync" --max-count=1 HEAD) | ||
COMMON_COMMIT_SHA$(git merge-base main $BRANCH) | ||
git checkout ${NEAREST_REBASE_COMMIT_SHA} | ||
# create release branch here | ||
CHE_RELEASE_VERSION=${{ github.event.inputs.version }} | ||
CHE_RELEASE_BRANCH=${CHE_RELEASE_VERSION%.*}.x | ||
git checkout -b ${CHE_RELEASE_BRANCH} | ||
# perform rebase to the closest commit | ||
./rebase.sh | ||
- | ||
name: "Tag release" | ||
if: {{ github.event.inputs.mode }} == all || {{ github.event.inputs.mode }} == release | ||
run: | | ||
git config --global user.name "Mykhailo Kuznietsov" | ||
git config --global user.email "[email protected]" | ||
git config --global pull.rebase true | ||
export GITHUB_TOKEN=${{ secrets.CHE_INCUBATOR_BOT_TOKEN }} | ||
/bin/bash make-release.sh --version ${{ github.event.inputs.version }} --tag-release | ||
#- name: Create failure MM message | ||
#if: failure() | ||
#run: | | ||
#echo "{\"text\":\":no_entry_sign: Che Code ${{ env.BRANCH_NAME }} release has failed: https://github.com/che-incubator/che-code/actions/workflows/release.yml\"}" > mattermost.json | ||
#- name: Send MM message | ||
# only notify for failure, success message will be sent at the end of image-publish job | ||
#if: failure() | ||
#uses: mattermost/[email protected] | ||
#env: | ||
#MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} | ||
#MATTERMOST_CHANNEL: eclipse-che-releases | ||
#MATTERMOST_USERNAME: che-bot |