Skip to content

Commit

Permalink
Turn deploy into a template.
Browse files Browse the repository at this point in the history
The deploy workflow cannot be shared because the PyPI GitHub Action
deploy workflow cannot be shared when using Trusted Publishers.

See pypi/warehouse#11096
  • Loading branch information
anoto-moniz committed May 15, 2024
1 parent f2cbc5d commit 92a64d0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ It also kicks off a second run of tests in an environment where the dependency v

Build and deploy the docs using GitHub Pages.

### Deploy to PyPI (deploy.yml)
## Templates

These are workflows which for whatever reason can't be shared. As such, we provide what it should look like in your repo.

### Deploy to PyPI (deploy-template.yml)

Package the code and deploy it to PyPI. This requires you have an action secret defined called `PYPI_API_TOKEN`.

See https://github.com/pypi/warehouse/issues/11096 for details on why the PyPI deploy workflow cannot be shared.
7 changes: 7 additions & 0 deletions .github/workflows/deploy.yml → deploy-template.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# As noted in https://github.com/pypi/warehouse/issues/11096, the current
# version of PyPI's GitHub Actions workflow uses the repo which calls it for
# Trusted Publishing, meaning it doesn't support being called in a shared
# workflow.
# To use the common deploy workflow, copy the workflow below into your repo for
# direct use. If/when they fix it, we'll update ASAP.

name: Deploy to PyPI

on:
Expand Down

0 comments on commit 92a64d0

Please sign in to comment.