v0.6.4 #7
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
# -- WORKFLOW: Publish/release this package on PyPI | |
# SEE: | |
# * https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
# * https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python#publishing-to-pypi | |
# | |
# * https://docs.github.com/en/actions/writing-workflows | |
# * https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs | |
# * https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#release | |
# | |
# GITHUB ACTIONS: | |
# * https://github.com/actions/checkout | |
# * https://github.com/pypa/gh-action-pypi-publish | |
# | |
# RELATED: | |
# * https://github.com/actions/starter-workflows/blob/main/ci/python-publish.yml | |
# -- STATE: PREPARED_ONLY, NOT_RELEASED_YET | |
name: release-to-pypi | |
on: | |
release: | |
types: [published] | |
tags: | |
- v0.* | |
- v1.* | |
permissions: | |
contents: read | |
jobs: | |
publish-package: | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
environment: | |
name: pypi | |
url: https://pypi.org/p/parse-type | |
permissions: | |
id-token: write # REQUIRED-FOR: Trusted publishing. | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: "Install Python package dependencies (with: uv)" | |
run: | | |
python -m pip install -U uv | |
python -m uv pip install -U pip setuptools wheel build twine | |
- name: Build this package | |
run: python -m build | |
- name: Check this package (before upload) | |
run: twine check dist/* | |
- name: Upload this package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
print-hash: true | |
verbose: true |