Add support for pex (#21) #8
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: Upload to PyPI | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
FORCE_COLOR: "1" | |
jobs: | |
pypi-publish: | |
name: upload release to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
environment: release | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Build artifacts | |
run: | | |
python -m pip install build | |
python -m build | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v3 | |
- name: Test Build | |
run: | | |
python -m pip install dist/*.whl | |
lxm3 version | |
- name: Publish package distributions to PyPI | |
run: pdm publish --no-build |