Skip to content

CD

CD #8

Workflow file for this run

name: CD
on:
release:
types: [published]
workflow_dispatch:
schedule:
- cron: "0 3 * * 1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.12"
- name: Build
run: |
python -m pip install build
python -m build .
- name: Store the distribution packages
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: python-package-distributions
path: dist/
if-no-files-found: error
publish:
name: Publish 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/pyodide-build
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
attestations: write
contents: read
steps:
- name: Download all the dists
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: dist/
merge-multiple: true
- name: Generate artifact attestations
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
with:
subject-path: "dist/*"
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3