minor doc fix, update changelog #347
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: PyPI | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| logLevel: | |
| description: 'Log level' | |
| required: true | |
| default: 'warning' | |
| type: choice | |
| options: | |
| - info | |
| - warning | |
| - debug | |
| tags: | |
| description: 'Test scenario tags' | |
| required: false | |
| type: boolean | |
| push: | |
| branches: [main, "release/*"] | |
| release: | |
| types: [published] | |
| jobs: | |
| build-package: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: >- | |
| python -m pip install --user --upgrade build twine setuptools | |
| - name: Build packages | |
| run: | | |
| python -m build | |
| ls -lh dist/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pypi-packages-${{ github.sha }} | |
| path: dist | |
| upload-package: | |
| runs-on: ubuntu-22.04 | |
| needs: build-package | |
| # only upload package assets with new release | |
| if: github.event_name == 'release' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: pypi-packages-${{ github.sha }} | |
| path: dist | |
| - run: ls -lh dist/ | |
| - name: Upload to release | |
| uses: AButler/[email protected] | |
| with: | |
| files: 'dist/*' | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| publish-package-testpypi: | |
| runs-on: ubuntu-22.04 | |
| needs: build-package | |
| permissions: | |
| id-token: write | |
| # only publish packages with new tags or release | |
| if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: pypi-packages-${{ github.sha }} | |
| path: dist | |
| - run: ls -lh dist/ | |
| - name: Delay releasing | |
| # give time to verify that the release looks good on github before proceeding with pypi | |
| uses: juliangruber/sleep-action@v1 | |
| with: | |
| time: 3m | |
| - name: Publish to Test PyPI | |
| uses: pypa/[email protected] | |
| publish-package-pypi: | |
| runs-on: ubuntu-22.04 | |
| needs: publish-package-testpypi | |
| permissions: | |
| id-token: write | |
| # only publish packages with new tags or release | |
| if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: pypi-packages-${{ github.sha }} | |
| path: dist | |
| - run: ls -lh dist/ | |
| - name: Delay releasing | |
| # give time to verify that the release looks good on github before proceeding with pypi | |
| uses: juliangruber/sleep-action@v1 | |
| with: | |
| time: 2m | |
| - name: Publish distribution 📦 to PyPI | |
| uses: pypa/[email protected] |