Bump Validation version #25
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
# Manually trigger version bump of NuvlaEdge Validation source code | |
name: Bump Validation version | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'SemVer type of version bump: major / minor / patch' | |
required: true | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
bump-version: | |
runs-on: ubuntu-latest | |
outputs: | |
old_version: ${{ steps.versioning.outputs.OLD_VERSION }} | |
new_version: ${{ steps.versioning.outputs.NEW_VERSION }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ssh-key: "${{ secrets.PRIVATE_COMMIT_KEY }}" | |
- name: SetUp python interpreter | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Load cached poetry | |
uses: actions/[email protected] | |
with: | |
path: ~/.local | |
key: dotlocal-${{ runner.os }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Bump version | |
id: versioning | |
run: | | |
echo "OLD_VERSION=$(poetry version -s)" >> "$GITHUB_OUTPUT" | |
poetry version ${{ github.event.inputs.version }} | |
echo "NEW_VERSION=$(poetry version -s)" >> "$GITHUB_OUTPUT" | |
poetry lock | |
- name: Generate new Tag | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "nuvlaedge-bot" | |
git add poetry.lock pyproject.toml | |
git commit -m "Bump to release: ${{ steps.versioning.outputs.NEW_VERSION }}" | |
git push origin main | |
git tag "${{ steps.versioning.outputs.NEW_VERSION }}" -m "NuvlaEdge Version ${{ steps.versioning.outputs.NEW_VERSION }}" | |
git push origin --tags |