Upload to PyPi #24
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload to PyPi | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[build] | |
- name: Build a binary wheel | |
run: | | |
python sup3r/utilities/_clean_readme.py README.rst | |
python -m build --sdist --wheel --outdir dist/ . | |
- name: Check distribution files | |
run: | | |
twine check dist/* | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@release/v1 |