Skip to content

chore: bump version from 1.0.17 to 1.0.18 (#192) #10

chore: bump version from 1.0.17 to 1.0.18 (#192)

chore: bump version from 1.0.17 to 1.0.18 (#192) #10

name: push-release-tag
on:
push:
branches: [main]
paths:
- 'pyproject.toml'
permissions:
id-token: write
contents: write
jobs:
push-release-tag:
name: Push release tag
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.12
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1
- name: Get the package version
run: |
echo "PACKAGE_VERSION=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
- name: Check if tag exists
id: check_tag
run: |
if git rev-parse "v${PACKAGE_VERSION}" >/dev/null 2>&1; then
echo "::set-output name=tag_exists::true"
else
echo "::set-output name=tag_exists::false"
fi
- name: Create Tag
if: steps.check_tag.outputs.tag_exists == 'false'
run: |
git tag "v${PACKAGE_VERSION}"
git push origin "v${PACKAGE_VERSION}"