Skip to content

chore: Added Version Control on CD #12

chore: Added Version Control on CD

chore: Added Version Control on CD #12

Workflow file for this run

name: Version Control
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install Poetry
run: |
pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python3 -
poetry config virtualenvs.create false
poetry install
- name: Increment version
run: |
poetry version patch # params: patch, minor, major
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git commit -am "chore: increment version"
git push
git tag $(poetry version -s)
git push origin --tags
# - name: Build package
# run: poetry build
#
# - name: Publish package to PyPI
# env:
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
# run: poetry publish --username __token__ --password $POETRY_PYPI_TOKEN_PYPI