Skip to content

Update lint_and_test.yaml #7

Update lint_and_test.yaml

Update lint_and_test.yaml #7

Workflow file for this run

name: Publish Python Package
on:
push:
tags:
- 'v*.*.*'
jobs:
build_and_publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Versioning
env:
TAG: ${{ github.ref_name }}
run: poetry version ${TAG#v}
- name: Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build