Skip to content

Fix publishing

Fix publishing #3

Workflow file for this run

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
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