Publish #6
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: Publish | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
pypi: | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python and Hatch | |
uses: "./.github/workflows/actions/setup-hatch" | |
- name: Build package | |
run: hatch build | |
- name: Run all tests with coverage | |
run: hatch run test:tests-cov | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |