From 847d375badbb9eb48d7762239177a833cd897636 Mon Sep 17 00:00:00 2001 From: Lorenzo Natali Date: Tue, 5 Mar 2024 09:37:53 +0100 Subject: [PATCH] workflow fixes (#10013) --- .github/ISSUE_TEMPLATE/release_steps.md | 11 +++++------ .github/workflows/cut_major_branch.yml | 8 ++++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release_steps.md b/.github/ISSUE_TEMPLATE/release_steps.md index 91531f3081..02de08ab86 100644 --- a/.github/ISSUE_TEMPLATE/release_steps.md +++ b/.github/ISSUE_TEMPLATE/release_steps.md @@ -22,12 +22,11 @@ This steps have to be followed always when preparing a new release. **Only** if you need to create a new stable major release (YYYY.XX.00), you need to create a branch for it. Check the following: - [ ] Run the [`Cut Release Branch`](https://github.com/geosolutions-it/MapStore2/actions/workflows/cut_major_branch.yml) workflow on github. - With the following Parameters: - - - [ ] Use workflow from branch `master` - - [ ] MapStore branch name to use: `YYYY.XX.xx` - - [ ] Version of *MapFish Print*, *GeoStore* and *HTTP-Proxy* accordingly to the [MapStore release calendar](https://github.com/geosolutions-it/MapStore2/wiki/MapStore-Release-Calendars) - - [ ] use the default value for the other parameters + With the following Parameters: + - [ ] Use workflow from branch `master` + - [ ] MapStore branch name to use: `YYYY.XX.xx` + - [ ] Version of *MapFish Print*, *GeoStore* and *HTTP-Proxy* accordingly to the [MapStore release calendar](https://github.com/geosolutions-it/MapStore2/wiki/MapStore-Release-Calendars) + - [ ] use the default value for the other parameters - [ ] Wait for the process to complete. At the end: - A Pull request will be created to the master - A new branch named `YYYY.XX.xx` with fixed versions diff --git a/.github/workflows/cut_major_branch.yml b/.github/workflows/cut_major_branch.yml index 064bab8ba8..3f726c34c6 100644 --- a/.github/workflows/cut_major_branch.yml +++ b/.github/workflows/cut_major_branch.yml @@ -69,7 +69,11 @@ jobs: mvn versions:use-dep-version -f $POM_FILE -Dincludes=$HTTP_PROXY_GROUP -DdepVersion=$HTTP_PROXY_VERSION -DforceVersion=true -DgenerateBackupPoms=false -DautoVersionSubmodules=true -Pprinting done echo $POM_FILES | xargs git add - git commit -m "Set versions of main dependencies to a stable version" + if ! git diff-index --quiet HEAD; then + git commit -m "Set versions of main dependencies to a stable version" + else + echo "::notice::No version changes in dependencies to commit. Please make sure to make this version fixed later" + fi git push --set-upstream origin "$BRANCH_NAME" echo "branch created" echo "creating bump changes" @@ -92,6 +96,6 @@ jobs: git add package.json git commit -m "Bump versions on master for release-branch" git push origin "${pr_branch_name}" - pr_url=$(gh pr create -B "${MAIN_BRANCH}" -H "${pr_branch_name}" --title "[github-action] Bump version for next release" --body "This automatic pull request bumps version of ${MAIN_BRANCH} branch for java packages and for package.json after creating the $release-branc") + pr_url=$(gh pr create -B "${MAIN_BRANCH}" -H "${pr_branch_name}" --title "[github-action] ${MAIN_BRANCH} - Bump version for next release" --body "This automatic pull request bumps version of ${MAIN_BRANCH} branch for java packages and for package.json after creating the ${RELEASE_BRANCH}") sleep 10 #gh pr merge "$pr_url" ${PR_OPTIONS}