Skip to content

Commit

Permalink
ci(release): add steps to update partial version reference tags
Browse files Browse the repository at this point in the history
  • Loading branch information
codejedi365 committed Sep 27, 2024
1 parent 58b95a0 commit 4abeaeb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4abeaeb

Please sign in to comment.