deploy #164
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: deploy | |
| on: | |
| release: | |
| types: | |
| - published | |
| schedule: | |
| - cron: "0 3 * * 1" | |
| permissions: {} | |
| concurrency: | |
| group: main-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 | |
| - name: Install requirements and build wheel | |
| shell: bash -l {0} | |
| run: | | |
| python -m pip install build | |
| python -m build . | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| if-no-files-found: error | |
| publish-to-pypi: | |
| name: Publish Python 🐍 distribution 📦 to PyPI | |
| needs: | |
| - build | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/auditwheel-emscripten | |
| permissions: | |
| contents: write | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| attestations: write | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Generate artifact attestation(s) | |
| uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2.1.0 | |
| with: | |
| subject-path: | | |
| dist/*.tar.gz | |
| dist/*.whl | |
| - name: Publish distribution 📦 to PyPI | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4 |