Skip to content

feat: publish

feat: publish #20

Workflow file for this run

name: Increment Version and Publish to PyPI
on:
push:
tags:
- 'v*.*.*'
jobs:
increment_version_and_publish:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Increment version
id: increment_version
run: |
poetry version patch
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add pyproject.toml
git commit -m "Increment version number"
git tag $(poetry version -s)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes and tags
run: |
git push origin HEAD:refs/heads/main
git push origin --tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build the package
run: |
poetry build
- name: Configure Poetry for PyPI
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN_REVIEW_TALLY }}"
- name: Poetry build and Publish
run: |
poetry build
- name: Publish to PyPI
run: |
poetry publish