From 288dd00de4370ad0bf84c96b3bebe6c579abf1d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Mon, 3 Feb 2025 10:50:29 +0100 Subject: [PATCH 01/10] branch renaming --- .github/rd-release-config.yml | 2 +- .github/workflows/CIBase.yml | 2 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/release-prep.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/rd-release-config.yml b/.github/rd-release-config.yml index 6f1d103d2..53fbb016e 100644 --- a/.github/rd-release-config.yml +++ b/.github/rd-release-config.yml @@ -94,7 +94,7 @@ autolabeler: - label: 'docker' files: - 'docker/**/*' - - label: 'backport release' + - label: 'backport stable' title: - '/bug/i' - '/resolve/i' diff --git a/.github/workflows/CIBase.yml b/.github/workflows/CIBase.yml index ecc883d77..0e41d8226 100644 --- a/.github/workflows/CIBase.yml +++ b/.github/workflows/CIBase.yml @@ -4,7 +4,7 @@ on: push: branches: - 'main' - - 'release/**' + - 'stable' permissions: contents: read diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 75c99056f..5e5fdd660 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -19,6 +19,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - commitish: 'release' + commitish: 'stable' name: ${{ github.ref_name }} - Draft release config-name: rd-release-config.yml diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index 08c7e8dc8..c52535166 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -62,7 +62,7 @@ jobs: # Create PR for release gh pr create \ - --base release \ + --base stable \ --head ${{ env.PR_BRANCH }} \ --title "Heat ${{ env.VERSION }} - Release" \ --body "Pre-release branch for Heat ${{ env.VERSION }}. From cfa86bd89decb74a768c942b6261a58ebd9a497c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Mon, 3 Feb 2025 13:06:46 +0100 Subject: [PATCH 02/10] changelog updater.md --- .github/workflows/changelog-updater.yml | 55 ------------------------- .github/workflows/release-drafter.yml | 4 +- .github/workflows/release-prep.yml | 23 +++++++++-- 3 files changed, 22 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/changelog-updater.yml diff --git a/.github/workflows/changelog-updater.yml b/.github/workflows/changelog-updater.yml deleted file mode 100644 index ef1f230ca..000000000 --- a/.github/workflows/changelog-updater.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: 'Update Changelog' - -on: - release: - types: [released] - -permissions: - contents: read - -jobs: - update-changelog: - permissions: - contents: write # for stefanzweifel/git-auto-commit-action to push code in repo - runs-on: ubuntu-latest - steps: - - name: Harden Runner - uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 - with: - egress-policy: audit - - - name: Checkout code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - repository: helmholtz-analytics/heat - ref: ${{ github.event.release.target_commitish }} - - name: Update Changelog - run: | - echo $RELEASE_TITLE > cl_title.md - echo "$RELEASE_BODY" > cl_new_body.md - echo "" > newline.txt - cat cl_title.md newline.txt cl_new_body.md newline.txt CHANGELOG.md > tmp - mv tmp CHANGELOG.md - rm cl_title.md - rm cl_new_body.md - rm newline.txt - cat CHANGELOG.md - env: - RELEASE_TITLE: ${{ format('# {0} - {1}', github.event.release.tag_name, github.event.release.name) }} - RELEASE_BODY: ${{ github.event.release.body }} - - name: Create PR - uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 - with: - base: main - branch: post-release-changelog-update - delete-branch: true - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update Changelog post release - title: Update Changelog post release - body: | - This PR updates the changelog post release. - - Changed files should include an updated CHANGELOG.md containing the release notes from the latest release. - - reviewers: ClaudiaComito, mtar, JuanPedroGHM - labels: chore, github_actions diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 5e5fdd660..4efc5d46d 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,7 +1,7 @@ name: Release Drafter on: - pull_request_target: + pull_request: types: [opened, reopened, synchronize] jobs: update_release_draft: @@ -21,4 +21,4 @@ jobs: with: commitish: 'stable' name: ${{ github.ref_name }} - Draft release - config-name: rd-release-config.yml + config-name: rd-release-config.yml \ No newline at end of file diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index c52535166..ad29ceb62 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -11,6 +11,10 @@ on: description: "The base branch to create the release branch from" required: true default: "main" + title: + description: "Release title" + required: False + default: "Heat" permissions: contents: write @@ -29,6 +33,14 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.base_branch }} + - uses: release-drafter/release-drafter@v6 # v6.0.0 + id: release_drafter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + commitish: 'stable' + name: ${{ github.event.inputs.title }} + config-name: rd-release-config.yml - name: Bump version.py and create PR env: PR_BRANCH: pre-release/${{ inputs.release_version }} @@ -48,13 +60,16 @@ jobs: sed -i "s/minor: int = \([0-9]\+\)/minor: int = $MINOR/g" heat/core/version.py sed -i "s/micro: int = \([0-9]\+\)/micro: int = $MICRO/g" heat/core/version.py sed -i "s/extension: str = .*/extension: str = None/g" heat/core/version.py + + { echo -n "# v${MAJOR}.${MINOR}.${MICRO} - ${{github.event.inputs.title}}\n${{ steps.release_drafter.outputs.body}}"; cat CHANGELOG.md; } > tmp.md + mv tmp.md CHANGELOG.md # Git configuration with anonymous user and email git config --global user.email "" git config --global user.name "Heat Release Bot" # Commit the changes - git add heat/core/version.py + git add heat/core/version.py CHANGELOG.md git commit -m "Bump version to $VERSION" # Push the changes @@ -75,11 +90,13 @@ jobs: - [ ] Ensure the Changelog is up to date [1]: https://github.com/peter-evans/create-pull-request" \ - --label invalid + --label "pre-release" # Create PR for main gh pr create --base main \ --head ${{ env.PR_BRANCH }} \ --title "Heat ${{ env.VERSION }} - Main" \ --body "Copy of latest pre-release PR targeting release." \ - --label invalid + --label "pre-release" + + From d05734a2ffa1d09b22a97c68f4de60c82ddb8e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Mon, 3 Feb 2025 14:44:05 +0100 Subject: [PATCH 03/10] Better pr text --- .github/workflows/release-prep.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index ad29ceb62..304227b6b 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -61,7 +61,7 @@ jobs: sed -i "s/micro: int = \([0-9]\+\)/micro: int = $MICRO/g" heat/core/version.py sed -i "s/extension: str = .*/extension: str = None/g" heat/core/version.py - { echo -n "# v${MAJOR}.${MINOR}.${MICRO} - ${{github.event.inputs.title}}\n${{ steps.release_drafter.outputs.body}}"; cat CHANGELOG.md; } > tmp.md + { echo -e "# v${MAJOR}.${MINOR}.${MICRO} - ${{github.event.inputs.title}}\n${{ steps.release_drafter.outputs.body}}\n"; cat CHANGELOG.md; } > tmp.md mv tmp.md CHANGELOG.md # Git configuration with anonymous user and email @@ -81,22 +81,28 @@ jobs: --head ${{ env.PR_BRANCH }} \ --title "Heat ${{ env.VERSION }} - Release" \ --body "Pre-release branch for Heat ${{ env.VERSION }}. - Any release work should be done on this branch, and then merged into the release branch and main, following git-flow. + Any release work should be done on this branch, and then merged into the release branch and main, following git-flow guidelines. TODO: - [x] Update version.py - - [ ] update the Requirements section on README.md if needed - - [ ] Update CITATION.cff if needed - - [ ] Ensure the Changelog is up to date + - [ ] Ensure Citation file is up to date. + - [ ] Ensure the Changelog is up to date. - [1]: https://github.com/peter-evans/create-pull-request" \ + DO NOT DELETE BRANCH AFTER MERGING!" \ --label "pre-release" # Create PR for main gh pr create --base main \ --head ${{ env.PR_BRANCH }} \ --title "Heat ${{ env.VERSION }} - Main" \ - --body "Copy of latest pre-release PR targeting release." \ + --body "Copy of latest pre-release PR targeting release. + DO NOT CHANGE ANYTHING UNTIL THE RELEASE BRANCH HAS BEEN MERGED. + + TODO: + - [ ] Make sure version.py is updated to reflect the dev version. + - [ ] Ensure Citation file is up to date. + - [ ] Ensure the Changelog is up to date. + --label "pre-release" From e556e1e7ea68908c689697debbb7299f833cda9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Mon, 3 Feb 2025 14:52:45 +0100 Subject: [PATCH 04/10] Missing endline in release-prep.yml --- .github/workflows/release-prep.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index 304227b6b..306f8dfca 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -101,8 +101,7 @@ jobs: TODO: - [ ] Make sure version.py is updated to reflect the dev version. - [ ] Ensure Citation file is up to date. - - [ ] Ensure the Changelog is up to date. - + - [ ] Ensure the Changelog is up to date." \ --label "pre-release" From d543f15b6447ba51db0f89921ba4a7ad6e2ea4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Mon, 3 Feb 2025 15:13:04 +0100 Subject: [PATCH 05/10] Updated release guidelines --- RELEASE.md | 95 ++++++++++++++++-------------------------------------- 1 file changed, 28 insertions(+), 67 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 2b0e6cc97..4d885e7bf 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -18,51 +18,33 @@ In the following, we assume we are about to release Heat v1.5.0. - You need [PyPi](https://pypi.org/), [Test.PyPi](https://test.pypi.org/) account - All intended PRs are merged, all tests have passed, and the `main` branch is ready for release. -1. We will release all new features in the development branch `main`. Branch off `main` to create a new release branch, e.g.: +**Create Pre-release Branch** -```bash -git checkout main -git pull -git checkout -b release/1.5.x -``` +1. Got to [this GH Action](https://github.com/helmholtz-analytics/heat/actions/workflows/release-prep.yml) and start a new manual workflow. -2. Create a new branch off `release/1.5.x` and update the version number in `heat/core/version.py`: + 1. Use workflow from should always be main. + 2. Change the version number to the next release (1.5.0) in this case. + 3. Because this is a mayor or minor release, the base branch should be `main`. + 4. Change the title, if you want to give the release a special name. + 5. Run the workflow. -```bash -git checkout release/1.5.x -git pull -git checkout -b workflows/version-update -``` +When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an update `CHANGELOG.md`. For now, ignore the PR targeting main. That PR should only be merged after the release has been merged to `stable`. - - -Update `heat/core/version.py` like this: - -```python -"""This module contains Heat's version information.""" - -major: int = 1 -"""Indicates Heat's main version.""" -minor: int = 4 # <-- update to 5 -"""Indicates feature extension.""" -micro: int = 2 # <-- update to 0 -"""Indicates revisions for bugfixes.""" -extension: str = "dev" # <-- set to None -"""Indicates special builds, e.g. for specific hardware.""" -``` - -3. Commit and push new `version.py` in `workflows/version-update`. +2. Ensure that the changes to `version.py` and `CHANGELOG.md` are correct, if not, fix them. 4. If necessary, also update the Requirements section on README.md to reflect the latest version of the dependencies. 5. Update `CITATION.cff` if needed, i.e. add names of non-core contributors (they are included in the Release notes draft you just created). Push to `workflows/version-update`. -6. Create a pull request from `workflows/version-update` to `release/1.5.x` - +6. Once the changes are done, merge the pull request. + - ONLY MERGE THE PR FOR `stable` + - DO NOT DELETE THE BRANCH AFTERWARDS. - Remember to get a reviewers approval. - Wait for the tests to finish. - Squash and merge. +Go to the main repo page, and then to releases (right panel). There should be a draft release with the changes made by the latest release. + 7. Draft release notes: - Go to the GitHub repo's [Releases](https://github.com/helmholtz-analytics/heat/releases) page. @@ -71,7 +53,8 @@ extension: str = "dev" # <-- set to None - Edit release notes as needed (see older releases) - Click on Save **but do not publish yet** -8. Build wheel in your local `heat/` directory, make sure you are on branch `release/1.5.x`. +8. On your local machine, fetch all the changes from origin, checkout the `stable` branch. +9. Build wheel in your local `heat/` directory. ```bash rm -f dist/* @@ -80,7 +63,7 @@ extension: str = "dev" # <-- set to None You might have to install the `build` package first (i.e. with `conda install -c conda-forge build` or `pip install build`) -9. Upload to Test PyPI and verify things look right. You need to install `twine` first. +10. Upload to Test PyPI and verify things look right. You need to install `twine` first. ```bash twine upload -r testpypi dist/* @@ -88,29 +71,18 @@ extension: str = "dev" # <-- set to None `twine` will prompt for your username and password. -10. When everything works, upload to PyPI: +11. When everything works, upload to PyPI: ```bash twine upload dist/* ``` -11. Go back to the Release Notes draft and publish them. The new release is out! +12. Go back to the Release Notes draft and publish them. The new release is out! - Make sure the CHANGELOG.md got updated, if not, call @JuanPedroGHM. - Check our [Zenodo page](https://zenodo.org/doi/10.5281/zenodo.2531472) to make sure a DOI was created for the release. -12. On branch `main`, we want to modify the version so that `minor` is increased by 1, and `extension` is "dev". In this example we want the version on `main` to be:`1.6.0-dev`. We need to create a new branch from `main`: - - ```bash - git checkout main - git pull - git checkout -b workflows/update-version-main - git branch - ``` - - On branch `workflows/update-version-main`, modify `version.py` so that `minor` is increased by 1, and `extension` is `"dev"`. Commit and push the changes. - -13. Create a PR with `main` as the base branch. +13. On branch `main`, we want to modify the version so that `minor` is increased by 1, and `extension` is "dev". We also want to merge any changes to the changelog, and overall make sure it is up to date with the latest release changes. That is what the second PR is for. In this example we want the version on `main` to be:`1.6.0-dev`. We go to the left over PR, and change the version number accordingly. Make sure to also fix any merge conflicts. 14. Get approval and merge. You're done! Except if you're a conda-forge maintainer, then see [conda-forge build](#conda-forge-build). @@ -119,28 +91,17 @@ extension: str = "dev" # <-- set to None (e.g. 1.5.0 --> 1.5.1) -1. Check that all intended branches have been merged to the release branch you want to upgrade, in this example `release/1.5.x`. Create a new branch off `release/1.5.x`, e.g.: - -```bash -git checkout release/1.5.x -git pull -git checkout -b workflows/version-update -``` +1. Check that all intended branches have been merged to the `stable` branch. -2. Update `heat/core/version.py` like this: +2. Got to [this GH Action](https://github.com/helmholtz-analytics/heat/actions/workflows/release-prep.yml) and start a new manual workflow. -```python -"""This module contains Heat's version information.""" + 1. Use workflow from should always be main. + 2. Change the version number to the next release (1.5.1) in this case. + 3. Because this is a mayor or minor release, the base branch should be `stable`. + 4. Change the title, if you want to give the release a special name. + 5. Run the workflow. -major: int = 1 -"""Indicates Heat's main version.""" -minor: int = 5 -"""Indicates feature extension.""" -micro: int = 0 # <-- update to 1 -"""Indicates revisions for bugfixes.""" -extension: str = None -"""Indicates special builds, e.g. for specific hardware.""" -``` +When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an update `CHANGELOG.md`. For now, ignore the PR targeting main. That PR should only be merged after the release has been merged to `stable`. 3. Follow steps 3-14 from the [Major or minor release section](#major-or-minor-release). From 1a4a51f5dca6f50f040820af9d65dbb9cb4c86c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pedro=20Guti=C3=A9rrez=20Hermosillo=20Muriedas?= Date: Tue, 11 Feb 2025 09:38:22 +0100 Subject: [PATCH 06/10] Apply suggestions from code review Co-authored-by: Claudia Comito <39374113+ClaudiaComito@users.noreply.github.com> --- .github/workflows/release-prep.yml | 6 +++--- RELEASE.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index 306f8dfca..ea260df90 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -81,11 +81,11 @@ jobs: --head ${{ env.PR_BRANCH }} \ --title "Heat ${{ env.VERSION }} - Release" \ --body "Pre-release branch for Heat ${{ env.VERSION }}. - Any release work should be done on this branch, and then merged into the release branch and main, following git-flow guidelines. + Any release work should be done on this branch, and then merged into `stable` and `main`, following git-flow guidelines. TODO: - [x] Update version.py - - [ ] Ensure Citation file is up to date. + - [ ] Ensure Citation file `CITATION.cff` is up to date. - [ ] Ensure the Changelog is up to date. DO NOT DELETE BRANCH AFTER MERGING!" \ @@ -96,7 +96,7 @@ jobs: --head ${{ env.PR_BRANCH }} \ --title "Heat ${{ env.VERSION }} - Main" \ --body "Copy of latest pre-release PR targeting release. - DO NOT CHANGE ANYTHING UNTIL THE RELEASE BRANCH HAS BEEN MERGED. + DO NOT CHANGE ANYTHING UNTIL "Heat ${{ env.VERSION }} - Release" HAS BEEN MERGED. TODO: - [ ] Make sure version.py is updated to reflect the dev version. diff --git a/RELEASE.md b/RELEASE.md index 4d885e7bf..c79798dca 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -22,9 +22,9 @@ In the following, we assume we are about to release Heat v1.5.0. 1. Got to [this GH Action](https://github.com/helmholtz-analytics/heat/actions/workflows/release-prep.yml) and start a new manual workflow. - 1. Use workflow from should always be main. + 1. `Use workflow from` should always be `main`. 2. Change the version number to the next release (1.5.0) in this case. - 3. Because this is a mayor or minor release, the base branch should be `main`. + 3. Because this is a major or minor release, the base branch should be `main`. 4. Change the title, if you want to give the release a special name. 5. Run the workflow. @@ -97,7 +97,7 @@ Go to the main repo page, and then to releases (right panel). There should be a 1. Use workflow from should always be main. 2. Change the version number to the next release (1.5.1) in this case. - 3. Because this is a mayor or minor release, the base branch should be `stable`. + 3. Because this is a patch release, the base branch should be `stable`. 4. Change the title, if you want to give the release a special name. 5. Run the workflow. From 4d844b0994ba07539cb224ebf201d59599b7e8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 11 Feb 2025 09:41:39 +0100 Subject: [PATCH 07/10] more code review suggestions --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index c79798dca..1785278e1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -28,7 +28,7 @@ In the following, we assume we are about to release Heat v1.5.0. 4. Change the title, if you want to give the release a special name. 5. Run the workflow. -When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an update `CHANGELOG.md`. For now, ignore the PR targeting main. That PR should only be merged after the release has been merged to `stable`. +When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an up-to-date `CHANGELOG.md`. For now, ignore the PR targeting main. That PR should only be merged after the release has been merged to `stable`. 2. Ensure that the changes to `version.py` and `CHANGELOG.md` are correct, if not, fix them. From dc90a26c02d0ea9ccd99f2107ada5068eafc82cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 11 Feb 2025 09:46:25 +0100 Subject: [PATCH 08/10] release pr for main made draft initially --- .github/workflows/release-prep.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index ea260df90..a2fdee9b3 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -95,6 +95,7 @@ jobs: gh pr create --base main \ --head ${{ env.PR_BRANCH }} \ --title "Heat ${{ env.VERSION }} - Main" \ + --draft \ --body "Copy of latest pre-release PR targeting release. DO NOT CHANGE ANYTHING UNTIL "Heat ${{ env.VERSION }} - Release" HAS BEEN MERGED. From 88dae48362e0ab5251583c5d41bd472843a3396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 11 Feb 2025 09:47:34 +0100 Subject: [PATCH 09/10] pre-commit compliace --- .github/workflows/release-drafter.yml | 2 +- .github/workflows/release-prep.yml | 8 +++----- RELEASE.md | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 4efc5d46d..6ebc18ef4 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -21,4 +21,4 @@ jobs: with: commitish: 'stable' name: ${{ github.ref_name }} - Draft release - config-name: rd-release-config.yml \ No newline at end of file + config-name: rd-release-config.yml diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index a2fdee9b3..be50219e1 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -60,7 +60,7 @@ jobs: sed -i "s/minor: int = \([0-9]\+\)/minor: int = $MINOR/g" heat/core/version.py sed -i "s/micro: int = \([0-9]\+\)/micro: int = $MICRO/g" heat/core/version.py sed -i "s/extension: str = .*/extension: str = None/g" heat/core/version.py - + { echo -e "# v${MAJOR}.${MINOR}.${MICRO} - ${{github.event.inputs.title}}\n${{ steps.release_drafter.outputs.body}}\n"; cat CHANGELOG.md; } > tmp.md mv tmp.md CHANGELOG.md @@ -96,13 +96,11 @@ jobs: --head ${{ env.PR_BRANCH }} \ --title "Heat ${{ env.VERSION }} - Main" \ --draft \ - --body "Copy of latest pre-release PR targeting release. - DO NOT CHANGE ANYTHING UNTIL "Heat ${{ env.VERSION }} - Release" HAS BEEN MERGED. + --body "Copy of latest pre-release PR targeting release. + DO NOT CHANGE ANYTHING UNTIL "Heat ${{ env.VERSION }} - Release" HAS BEEN MERGED. TODO: - [ ] Make sure version.py is updated to reflect the dev version. - [ ] Ensure Citation file is up to date. - [ ] Ensure the Changelog is up to date." \ --label "pre-release" - - diff --git a/RELEASE.md b/RELEASE.md index 1785278e1..8f464f3d2 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -30,7 +30,7 @@ In the following, we assume we are about to release Heat v1.5.0. When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an up-to-date `CHANGELOG.md`. For now, ignore the PR targeting main. That PR should only be merged after the release has been merged to `stable`. -2. Ensure that the changes to `version.py` and `CHANGELOG.md` are correct, if not, fix them. +2. Ensure that the changes to `version.py` and `CHANGELOG.md` are correct, if not, fix them. 4. If necessary, also update the Requirements section on README.md to reflect the latest version of the dependencies. From 3c6ea7897405fdb7c807a325a12527274b5c58f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Wed, 12 Feb 2025 09:49:00 +0100 Subject: [PATCH 10/10] pre-commit prs need to get backported --- .github/rd-release-config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/rd-release-config.yml b/.github/rd-release-config.yml index 53fbb016e..36690f4d7 100644 --- a/.github/rd-release-config.yml +++ b/.github/rd-release-config.yml @@ -99,6 +99,7 @@ autolabeler: - '/bug/i' - '/resolve/i' - '/fix/i' + - '/\[pre\-commit\.ci\]/i' branch: - '/bug/i' - '/fix/i'