From 7bec305b53467d1941f3a2b9300cbdcde1514ee4 Mon Sep 17 00:00:00 2001
From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com>
Date: Fri, 29 Dec 2023 12:07:19 -0500
Subject: [PATCH 1/8] fix semver workflow to conform to regex conventions in
GitHub
---
.github/workflows/bump-version.yml | 30 ++++++++++++++----------------
1 file changed, 14 insertions(+), 16 deletions(-)
diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml
index 17659bb83..b9bd0d62d 100644
--- a/.github/workflows/bump-version.yml
+++ b/.github/workflows/bump-version.yml
@@ -6,19 +6,18 @@ on:
- master
paths-ignore:
- .*
- - .github/**.yml
+ - .github/*/*.yml
- CHANGES.rst
- Makefile
- - docs/**.ipynb
- - docs/**.py
- - docs/**.rst
+ - docs/*/*.ipynb
+ - docs/*/*.py
+ - docs/*/*.rst
- docs/Makefile
- docs/make.bat
- docs/references.bib
- environment.yml
- pylintrc
- pyproject.toml
- - requirements_dev.txt
- requirements_upstream.txt
- tox.ini
- xclim/__init__.py
@@ -46,20 +45,19 @@ jobs:
- name: Install bump-my-version
run: |
python -m pip install bump-my-version
- - name: Bump Patch Version
- if: ${{ !env.CURRENT_VERSION =~ \d+\.\d+\.\d+(-dev(\.\d+)?)?$ }}
+ - name: Conditional Bump
+ id: bump
run: |
- echo "Version is stable, bumping 'patch' version"
- bump-my-version bump patch
- NEW_VERSION="$(grep -E '__version__' xclim/__init__.py | cut -d ' ' -f3)"
- echo "new_version=${NEW_VERSION}"
- - name: Bump Build Version
- if: ${{ env.CURRENT_VERSION =~ \d+\.\d+\.\d+(-dev(\.\d+)?)?$ }}
- run: |
- echo "Development version (ends in 'dev(\.\d+)?'), bumping 'build' version"
- bump-my-version bump build
+ if [[ $CURRENT_VERSION =~ \d+\.\d+\.\d+(-dev(\.\d+)?)?$ ]]; then
+ echo "Development version (ends in 'dev(\.\d+)?'), bumping 'build' version"
+ bump-my-version bump build
+ else
+ echo "Version is stable, bumping 'patch' version"
+ bump-my-version bump patch
+ fi
NEW_VERSION="$(grep -E '__version__' xclim/__init__.py | cut -d ' ' -f3)"
echo "new_version=${NEW_VERSION}"
+ echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV
- name: Push Changes
uses: ad-m/github-push-action@v0.8.0
with:
From 1ed9e3d3aeb37ceb5fd2ac5ec8c9783e86ff941a Mon Sep 17 00:00:00 2001
From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com>
Date: Fri, 29 Dec 2023 13:11:43 -0500
Subject: [PATCH 2/8] update deployment information
---
CONTRIBUTING.rst | 40 +++++++++++++++++-----------------------
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index e9ad5486c..fe75f7c8a 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -354,47 +354,41 @@ The method we use is as follows::
**Patch** should be used for bug fixes and optimizations;
-**Release** is a keyword used to specify the degree of production readiness (`beta` [, and optionally, `gamma`]). *Only versions built from the main development branch will ever have this tag!*
+**Release** is a keyword used to specify the degree of production readiness (`dev` [, and optionally, `release`]). *Only versions built from the main development branch will ever have this marker!*
- An increment to the Major or Minor will reset the Release to `beta`. When a build is promoted above `beta` (ie: release-ready), it's a good idea to push this version towards PyPi.
+**Build** is a keyword used to specify the build number. *Only versions built from the main development branch will ever have this number!*
-Deploying
----------
+An increment to the Major or Minor will reset the Release to `beta`. When a build is promoted above `beta` (ie: the release/stable version), it's a good idea to push this version towards PyPI.
-A reminder for the maintainers on how to prepare the library for a tagged version.
+Packaging and Deployment
+------------------------
-Make sure all your changes are committed (**including an entry in HISTORY.rst**).
-Then run::
+This section serves as a reminder for the maintainers on how to prepare the library for a tagged version and how to deploy packages to TestPyPI and PyPI.
- $ bump2version