v3.8.0 #19
Workflow file for this run
This file contains 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: Release to PyPI | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
build-and-pubish: | |
name: Build and Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- name: Install Python | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
- name: Install build dependencies | |
run: python -m pip install -U setuptools build wheel | |
- name: Build distributions | |
run: python -m build | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # main | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |