Bump version for readme change on pypi #14
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 to PyPI | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Python and PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.12" | |
cache: true | |
- name: Install Dependencies | |
run: pdm install -G test --frozen-lockfile | |
- name: Run Tests | |
run: pdm run pytest --tb=short | |
publish-testpypi: | |
needs: test # Requires tests to pass first | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Python and PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.12" | |
cache: true | |
- name: Build Package | |
run: pdm build | |
- name: Publish to TestPyPI | |
env: | |
PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} | |
run: pdm publish --repository testpypi --username $PYPI_USERNAME --password $PYPI_PASSWORD | |
publish-pypi: | |
needs: [test, publish-testpypi] # Requires both tests and TestPyPI publish to pass | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Python and PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.12" | |
cache: true | |
- name: Build Package | |
run: pdm build | |
- name: Publish to PyPI | |
env: | |
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: pdm publish --repository pypi --username $PYPI_USERNAME --password $PYPI_PASSWORD |