From 649dc7bb00dc47339b5da00cf96254f6db421f72 Mon Sep 17 00:00:00 2001 From: Emmanuel Branlard Date: Sat, 26 Oct 2024 17:08:05 -0400 Subject: [PATCH] GH: Update of release process --- .github/workflows/tests.yml | 8 +++++++- _tools/NewRelease.md | 19 +++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4b0fef8..c1d36cc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,7 +47,13 @@ jobs: elif [[ $GITHUB_REF == *"main"* ]]; then echo ">>> This is not a tagged version, but on the main branch" export VERSION_TAG=$CURRENT_TAG - export VERSION_NAME="$CURRENT_TAG-`git rev-list $CURRENT_TAG.. --count`" + export VERSION_COUNT="`git rev-list $CURRENT_TAG.. --count`" + echo "VERSION_COUNT >$VERSION_COUNT<" + if [[ $VERSION_COUNT == "" ]]; then + export VERSION_NAME="$CURRENT_TAG-0" + else + export VERSION_NAME="$CURRENT_TAG-$VERSION_COUNT" + fi export FULL_VERSION_NAME="version $VERSION_NAME" #elif [[ $BRANCH == "dev" ]]; then # echo ">>> This is not a tagged version, but on the dev branch" diff --git a/_tools/NewRelease.md b/_tools/NewRelease.md index 0078a7e..cf31ac3 100644 --- a/_tools/NewRelease.md +++ b/_tools/NewRelease.md @@ -2,29 +2,32 @@ # Creating a new release Steps: -- Change version in setup.py -- Change PROG\_VERSION in pydateview/main.py -- Change version in installler.cfg -- Change CURRENT\_DEV\_TAG in .github/workflows/tests.yml (not pretty...) +- Change version in ../setup.py +- Change PROG\_VERSION in ../pydateview/main.py +- Change version in ../installer.cfg +- Change CURRENT\_DEV\_TAG in ../.github/workflows/tests.yml (not pretty...) - Commit changes and push to pull request - Merge pull request from old to new version - Tag new version v0.x: git tag -a v0.x + - Push tags: git push --tags + - Github actions looks at GITHUB_REF to see if it's a tag. If it's a tag, it should push to it. Otherwise, it pushes to the tag defined by CURRENT_DEV_TAG - Make sure things worked -- checkout dev and create a new dev tag, e.g. v0.3-dev +- checkout dev and create a new dev tag, e.g. + git tag v0.6-dev -- Rename vdev to v0.3-dev - git tag v0.3-dev vdev +- (OLD: Rename vdev to v0.6-dev + git tag v0.6-dev vdev git tag -d vdev - git push origin v0.3-dev :vdev + git push origin v0.3-dev :vdev )