Skip to content

Commit

Permalink
feat: use stable vscode version for releases
Browse files Browse the repository at this point in the history
Signed-off-by: Mykhailo Kuznietsov <[email protected]>
  • Loading branch information
mkuznyetsov committed May 13, 2024
1 parent e7d3a32 commit c270639
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 75 deletions.
63 changes: 0 additions & 63 deletions .github/workflows/rebase-release-branch.yml

This file was deleted.

32 changes: 20 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit c270639

Please sign in to comment.