feat(installer): remove vX-latest from tag_release

Also update RELEASE.md accordingly, and make the release.yml workflow match on `v*` tags.
This commit is contained in:
psychedelicious 2024-01-01 11:18:40 +11:00 committed by Kent Keirsey
parent 50e58ff323
commit 99ee8f9099
3 changed files with 3 additions and 20 deletions

View File

@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- 'v*.*.*'
- 'v*'
workflow_dispatch:
inputs:
skip_code_checks:

View File

@ -15,7 +15,7 @@ While the release workflow does not include end-to-end tests, it does pause befo
The `release.yml` workflow runs a number of jobs to handle code checks, tests, build and publish on PyPI.
It is triggered on **tag push**, when the tag matches `v*.*.*`. It doesn't matter if you've prepped a release branch like `release/v3.5.0` or are releasing from `main` - it works the same.
It is triggered on **tag push**, when the tag matches `v*`. It doesn't matter if you've prepped a release branch like `release/v3.5.0` or are releasing from `main` - it works the same.
> Because commits are reference-counted, it is safe to create a release branch, tag it, let the workflow run, then delete the branch. So long as the tag exists, that commit will exist.
@ -23,10 +23,6 @@ It is triggered on **tag push**, when the tag matches `v*.*.*`. It doesn't matte
Run `make tag-release` to tag the current commit and kick off the workflow.
This script actually makes two tags - one for the specific version, and a `vX-latest` tag that changes with each release.
Because the release workflow only triggers on the pattern `v*.*.*`, the workflow will only run once when running this script.
The release may also be run [manually].
### Workflow Jobs and Process

View File

@ -26,20 +26,13 @@ VERSION=$(
python3 -c "from invokeai.version import __version__ as version; print(version)"
)
PATCH=""
MAJOR_VERSION=$(echo $VERSION | sed 's/\..*$//')
VERSION="v${VERSION}${PATCH}"
LATEST_TAG="v${MAJOR_VERSION}-latest"
if does_tag_exist $VERSION; then
echo -e "${BCYAN}${VERSION}${RESET} already exists:"
git_show_ref tags/$VERSION
echo
fi
if does_tag_exist $LATEST_TAG; then
echo -e "${BCYAN}${LATEST_TAG}${RESET} already exists:"
git_show_ref tags/$LATEST_TAG
echo
fi
echo -e "${BGREEN}HEAD${RESET}:"
git_show
@ -49,7 +42,7 @@ echo -e "${BGREEN}git remote -v${RESET}:"
git remote -v
echo
echo -e -n "Create tags ${BCYAN}${VERSION}${RESET} and ${BCYAN}${LATEST_TAG}${RESET} @ ${BGREEN}HEAD${RESET}, ${RED}deleting existing tags on origin remote${RESET}? "
echo -e -n "Create tags ${BCYAN}${VERSION}${RESET} @ ${BGREEN}HEAD${RESET}, ${RED}deleting existing tags on origin remote${RESET}? "
read -e -p 'y/n [n]: ' input
RESPONSE=${input:='n'}
if [ "$RESPONSE" == 'y' ]; then
@ -63,12 +56,6 @@ if [ "$RESPONSE" == 'y' ]; then
exit -1
fi
echo -e "Deleting ${BCYAN}${LATEST_TAG}${RESET} tag on origin remote..."
git push origin :refs/tags/$LATEST_TAG
echo -e "Tagging ${BGREEN}HEAD${RESET} with ${BCYAN}${LATEST_TAG}${RESET} locally..."
git tag -fa $LATEST_TAG
echo -e "Pushing updated tags to origin remote..."
git push origin --tags
fi