Skip to content

Maybe this will do it #17

Maybe this will do it

Maybe this will do it #17

Workflow file for this run

name: Release on PyPI
on:
release:
types:
- published
jobs:
build:
name: Build package using Poetry
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.7.1"
- name: Build package
run: poetry build
- name: Store distribution files
uses: actions/upload-artifact@v3
with:
name: distribution
path: dist/
- name: Upload release attachment
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/*
publish:
name: Publish package to PyPI
runs-on: ubuntu-latest
needs: build
if: needs.build.result == 'success'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.7.1"
- name: Retrieve distribution files
uses: actions/download-artifact@v3
with:
name: distribution
path: dist/
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish
bump:
name: Bump to (next) dev version
needs: publish
if: ${{ needs.publish.result == 'success' }}
uses: ./.github/workflows/bump.yml@main

Check failure on line 74 in .github/workflows/publish_pypi.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish_pypi.yml

Invalid workflow file

invalid value workflow reference: cannot specify version when calling local workflows
secrets: inherit
with:
rule: prerelease