Skip to content

Commit 5cfc6dc

Browse files
authored
CI Release latest packages to pyodide-nightly package index. (#362)
1 parent fb77ea0 commit 5cfc6dc

File tree

2 files changed

+63
-2
lines changed

2 files changed

+63
-2
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ jobs:
283283
name: repodata
284284
path: ./repodata/
285285
retention-days: 7
286-
286+
287287
- name: Store build logs
288288
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
289289
with:
@@ -468,7 +468,7 @@ jobs:
468468
run: node scipy-pytest.js --pyargs scipy -m "not slow" -vra
469469
working-directory: packages/scipy/
470470

471-
release:
471+
release: # deploy to pyodide channel
472472
runs-on: ubuntu-latest
473473
defaults:
474474
run:
@@ -506,3 +506,42 @@ jobs:
506506
run: |
507507
# Anaconda denies packages with long descriptions, so set summary to null
508508
anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --force ./repodata/*.whl --summary=" " --description=" "
509+
510+
release-nightly: # deploys to pyodide-nightly channel
511+
runs-on: ubuntu-latest
512+
defaults:
513+
run:
514+
shell: bash -el {0}
515+
needs: [build]
516+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
517+
environment: deploy-nightly
518+
steps:
519+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
520+
with:
521+
fetch-depth: 0
522+
submodules: recursive
523+
persist-credentials: false
524+
525+
- name: Setup Mambaforge
526+
uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
527+
with:
528+
miniforge-variant: Miniforge3
529+
miniforge-version: latest
530+
activate-environment: pyodide-env
531+
conda-remove-defaults: true
532+
channels: conda-forge
533+
534+
- name: Download build artifact
535+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
536+
with:
537+
name: repodata
538+
path: ./repodata/
539+
540+
- name: Install anaconda-client
541+
run: |
542+
mamba install -c defaults anaconda-client -y
543+
544+
- name: Upload wheels
545+
run: |
546+
# Anaconda denies packages with long descriptions, so set summary to null
547+
anaconda -t ${{ secrets.ANACONDA_API_TOKEN }} upload --force ./repodata/*.whl --summary=" " --description=" "

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,28 @@ and other metadata including the dependencies.
3030
See the [Pyodide documentation](https://pyodide.org/en/stable/development/adding-packages-into-pyodide-distribution.html)
3131
for more information on creating package recipes.
3232

33+
## How to use the recipes in Pyodide
34+
35+
There are three ways to use the packages built by this repository in Pyodide:
36+
37+
### 1. Wait until the next Pyodide release
38+
39+
When we release a new version of Pyodide, we include the updated recipes in the Pyodide distribution.
40+
But we don't guarantee that patch releases of Pyodide will include the updated recipes.
41+
42+
### 2. Use Anaconda package index
43+
44+
We also release the recipes to Anaconda package index. You can pass the following indesx URLs to `micropip` to install the packages
45+
from the index.
46+
47+
- `https://pypi.anaconda.org/pyodide/simple`: Contains all the packages built for all stable versions of Pyodide since Pyodide 0.28.0.
48+
- `https://pypi.anaconda.org/pyodide-nightly/simple`: Contains the tip-of-tree packages which exist in the `main` branch of this repository.
49+
50+
### 3. Download the release artifact from GitHub releases
51+
52+
We release the built packages as a tarball in the GitHub releases occassionally.
53+
You can download the tarball and host it on your own server.
54+
3355
## Maintainer information
3456

3557
See [MAINTAINERS.md](docs/MAINTAINERS.md) for information on how to maintain this repository.

0 commit comments

Comments
 (0)