-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(release): add steps to update partial version reference tags
- Loading branch information
1 parent
58b95a0
commit 4abeaeb
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,10 +53,29 @@ jobs: | |
ref: ${{ github.ref_name }} | ||
|
||
- name: Python Semantic Release | ||
id: release | ||
uses: python-semantic-release/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
root_options: "-vv -c releaserc.toml" | ||
force: ${{ github.event.inputs.bump-version }} | ||
prerelease: ${{ github.event.inputs.as-prerelease }} | ||
changelog: false | ||
|
||
- name: Update Minor Release Tag Reference | ||
if: steps.release.outputs.released == 'true' | ||
env: | ||
FULL_VERSION_TAG: ${{ steps.release.outputs.tag }} | ||
run: | | ||
MINOR_VERSION_TAG=$(echo $FULL_VERSION_TAG | cut -d. -f1,2) | ||
git tag --force --annotate "$MINOR_VERSION_TAG" "${VERSION}^{}" -m "$MINOR_VERSION_TAG" | ||
git push -u origin "$MINOR_VERSION_TAG" --force | ||
- name: Update Major Release Tag Reference | ||
if: steps.release.outputs.released == 'true' | ||
env: | ||
FULL_VERSION_TAG: ${{ steps.release.outputs.tag }} | ||
run: | | ||
MAJOR_VERSION_TAG=$(echo $FULL_VERSION_TAG | cut -d. -f1) | ||
git tag --force --annotate "$MAJOR_VERSION_TAG" "${VERSION}^{}" -m "$MAJOR_VERSION_TAG" | ||
git push -u origin "$MAJOR_VERSION_TAG" --force |