Skip to content

Build

Build #4

Workflow file for this run

name: Build
on: [push, pull_request]
permissions:
contents: read
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Build sdist
run: |
python -m pip install --user build
python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: source
path: dist/*.tar.gz
upload_pypi:
name: Upload wheels to PyPI
needs: [build_sdist]
environment:
name: pypi
url: https://pypi.org/p/pyqodeng
permissions:
id-token: write
runs-on: ubuntu-latest
# Upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- run: |
mkdir dist
find artifacts -type f -exec mv {} dist \;
- uses: pypa/gh-action-pypi-publish@release/v1