Skip to content

Commit 7789d4a

Browse files
committed
Document how previous versions are found
Signed-off-by: Nolan Brubaker <[email protected]>
1 parent 1dfb164 commit 7789d4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/release.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
- name: Set version info
2525
run: |
2626
echo "VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV
27-
echo "PREVIOUS_VERSION=$(git describe --abbrev=0 2> /dev/null)" >> $GITHUB_ENV
27+
# NB: this gets the closest tag cut from the same branch; for new minor tags, it will find the previous minor, not the previous patch release
28+
# (for example v2.7.0, not v2.7.3). For new patch releases, it should fetch the previous patch (e.g. 2.7.3, not v2.7.0)
29+
echo "PREVIOUS_VERSION=$(git describe --abbrev=0 2> /dev/null)" >> $GITHUB_ENV
2830
echo "RELEASE_BRANCH=release-$(echo ${GITHUB_REF_NAME} | grep -Eo '[0-9]\.[0-9]+')" >> $GITHUB_ENV
2931
echo "RELEASE_TAG=${GITHUB_REF_NAME}" >> $GITHUB_ENV
3032
- name: Run release

0 commit comments

Comments
 (0)