···58585959## Automated releases with the Jupyter Releaser
60606161-The extension repository should already be compatible with the Jupyter Releaser. But
6262-the GitHub repository and the package managers need to be properly set up. Please
6363-follow the instructions of the Jupyter Releaser [checklist](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo.html).
6161+The extension repository should already be compatible with the Jupyter Releaser.
6262+6363+Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html) for more information.
64646565Here is a summary of the steps to cut a new release:
66666767+- Add tokens to the [Github Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) in the repository:
6868+ - `ADMIN_GITHUB_TOKEN` (with "public_repo" and "repo:status" permissions); see the [documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
6969+ - `NPM_TOKEN` (with "automation" permission); see the [documentation](https://docs.npmjs.com/creating-and-viewing-access-tokens)
7070+- Set up PyPI
7171+7272+<details><summary>Using PyPI trusted publisher (modern way)</summary>
7373+7474+- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
7575+ - The _workflow name_ is `publish-release.yml` and the _environment_ should be left blank.
7676+- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))
7777+7878+</details>
7979+8080+<details><summary>Using PyPI token (legacy way)</summary>
8181+8282+- If the repo generates PyPI release(s), create a scoped PyPI [token](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#saving-credentials-on-github). We recommend using a scoped token for security reasons.
8383+8484+- You can store the token as `PYPI_TOKEN` in your fork's `Secrets`.
8585+8686+ - Advanced usage: if you are releasing multiple repos, you can create a secret named `PYPI_TOKEN_MAP` instead of `PYPI_TOKEN` that is formatted as follows:
8787+8888+ ```text
8989+ owner1/repo1,token1
9090+ owner2/repo2,token2
9191+ ```
9292+9393+ If you have multiple Python packages in the same repository, you can point to them as follows:
9494+9595+ ```text
9696+ owner1/repo1/path/to/package1,token1
9797+ owner1/repo1/path/to/package2,token2
9898+ ```
9999+100100+</details>
101101+67102- Go to the Actions panel
68103- Run the "Step 1: Prep Release" workflow
69104- Check the draft changelog
70105- Run the "Step 2: Publish Release" workflow
711067272-> [!NOTE]
7373-> Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html)
7474-> for more information.
7575-76107## Publishing to `conda-forge`
7710878109If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html
791108080-Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.
111111+Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.