Skip to content

Publish to PyPI

Publish to PyPI #22

name: Publish to PyPI
on:
workflow_run:
workflows: ["Test"]
types:
- completed
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
environment: deploy
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: prefix-dev/setup-pixi@v0.8.2
with:
pixi-version: v0.41.3
cache: true
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
- name: Build package
run: |
pixi r -e build python -m build
pixi r -e build twine check dist/*
- name: Publish to TestPyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://upload.pypi.org/legacy