Skip to content

added publish to pypi workflow #1

added publish to pypi workflow

added publish to pypi workflow #1

name: Publish to PyPI
on:
push:
tags:
- '**'
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_PETDEFACE }}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: 'poetry'
- name: Install dependencies
run: |
pipx install poetry
poetry install
- name: Build
run: |
poetry build
- name: Publish
if: '!contains(github.ref_name, "test")'

Check failure on line 32 in .github/workflows/publish_to_pypi.yaml

View workflow run for this annotation

GitHub Actions / Publish to PyPI

Invalid workflow file

The workflow is not valid. .github/workflows/publish_to_pypi.yaml (Line: 32, Col: 13): Unexpected symbol: '"test"'. Located at position 28 within expression: !contains(github.ref_name, "test")

Check failure on line 32 in .github/workflows/publish_to_pypi.yaml

View workflow run for this annotation

GitHub Actions / Publish to PyPI

Invalid workflow file

The workflow is not valid. .github/workflows/publish_to_pypi.yaml (Line: 32, Col: 13): Unexpected symbol: '"test"'. Located at position 28 within expression: !contains(github.ref_name, "test")
run: |
echo "Publishing to PyPI..."
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish