Skip to content

Version 1.2.0

Version 1.2.0 #14

Workflow file for this run

name: hammer-publish-ci
# https://nadeauinnovations.com/post/2020/08/one-version-to-rule-them-all-keeping-your-python-package-version-number-in-sync-with-git-and-poetry/
on:
release:
types: [created]
env:
POETRY_VERSION: "1.5.0"
PYTHON_VERSION: "3.9"
jobs:
publish:
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
version: ${{ env.POETRY_VERSION }}
- name: Create Poetry env
run: |
poetry config virtualenvs.in-project true
poetry install --no-ansi
- name: Publish
id: publish
run: |
poetry version $(git describe --tags --abbrev=0)
poetry build
poetry publish --username "__token__" --password ${{ secrets.PYPI_TOKEN }}