Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to PyPI on publish release #64

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish release to PyPI

on:
release:
types: [ published ]

env:
# make sure the poetry creates the venv inside the workspace under .venv
POETRY_VIRTUALENVS_IN_PROJECT: true

jobs:
build:
name: Publish from release
if: github.event_name == 'release'
uses: qua-platform/qualibrate-core/.github/workflows/reusable-build.yaml@main

release:
name: Release package to PyPi
runs-on: ubuntu-latest
needs:
- build-release
- build-manually
permissions:
id-token: write
contents: read
checks: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# This is necessary so that we have the tags.
fetch-depth: 0

- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
pattern: python-package-*

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1.10.3
with:
password: ${{ secrets.PYPI_API_TOKEN }}
File renamed without changes.