use pdm-build-locked #3
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
### DO NOT MERGE | |
### tests build of pdm with pdm-build-locked | |
name: Release | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
release-pypi: | |
name: release-pypi | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
- name: Check prerelease | |
id: check_version | |
run: | | |
if [[ "${{ github.ref }}" =~ ^refs/tags/[0-9.]+$ ]]; then | |
echo "PRERELEASE=false" >> $GITHUB_OUTPUT | |
else | |
echo "PRERELEASE=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Build artifacts | |
run: | | |
pip install . | |
pdm install --plugins | |
pdm build | |
- name: Test Build | |
run: | | |
python -m pip install "pdm[locked] @ file://${$(pwd)/dist/*.whl}" | |
pdm --help |