Update workflow #3
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: | |
branches: | |
- main | |
jobs: | |
publish-library: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pdm-project/setup-pdm@v4 | |
name: Setup Python and PDM | |
with: | |
python-version: "3.12" | |
cache: true | |
- name: Ensure lock file is up to date | |
run: | | |
pdm lock --check | |
- name: Install dependencies | |
run: | | |
pdm sync -d | |
- name: Build package | |
run: pdm build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |