Build Python Distribution #2
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: Build Python Distribution | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build_wheel: | |
| name: Build Wheel | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.13" | |
| - run: python3 -m pip install build | |
| - run: python3 -m build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: build_wheel | |
| path: dist | |
| release: | |
| needs: | |
| - build_wheel | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Download Wheel | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build_wheel | |
| path: dist | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| generateReleaseNotes: true | |
| allowUpdates: true | |
| artifacts: "dist/*" | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |