Version 23.1.0 #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: Build and verify package, with optional upload to PyPI | |
on: | |
push: | |
branches: [main] | |
tags: ["*"] | |
pull_request: | |
branches: [main] | |
release: | |
types: | |
- published | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
build-package: | |
name: Build and verify package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: hynek/build-and-inspect-python-package@v1 | |
release-pypi: | |
name: Publish released package to PyPI | |
environment: release-pypi | |
if: github.event.action == 'published' | |
runs-on: ubuntu-latest | |
needs: build-package | |
steps: | |
- name: Download previously built packages | |
uses: actions/download-artifact@v3 | |
with: | |
name: Packages | |
path: dist | |
- name: Upload packages | |
uses: pypa/gh-action-pypi-publish@release/v1 |