Merge pull request #19 from wey-gu/more_coverage #14
Workflow file for this run
This file contains hidden or 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: Release to PyPI | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| release: | |
| types: [published] | |
| jobs: | |
| test-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| pip install types-psutil | |
| - name: Run full development workflow | |
| run: | | |
| python scripts/dev.py | |
| env: | |
| PYTHONPATH: . | |
| - name: Test package build | |
| run: | | |
| pip install build | |
| python -m build | |
| pip install dist/*.whl | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: test-release | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/py-pglite/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Check package | |
| run: | | |
| twine check dist/* | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| # trusted-publisher no need for password | |
| # with: | |
| # password: ${{ secrets.PYPI_API_TOKEN }} |