Skip to content

Add approvable workflow to deploy to PyPI - #275

Merged
nir0s merged 3 commits into
python-distro:masterfrom
sethmlarson:gha-deploy
Jul 1, 2021
Merged

nir0s merged 3 commits into
python-distro:masterfrom
sethmlarson:gha-deploy

Conversation

@sethmlarson

@sethmlarson sethmlarson commented Jun 30, 2021 •

Copy link
Copy Markdown
Contributor

Since we're in an organization now, instead of having any individual able to deploy to PyPI (security risk!) I propose we create an approvable workflow using GitHub Actions where (after a tag is created) two maintainers, one initiating and one approving can build and deploy the tag to PyPI.

This requires the following:

  • Setting up the Workflow/Environment in GitHub, I'm not sure if it's automatically done as I've not created one before, only used them.
  • @nir0s create an API token on PyPI with the distro scope and attach it to the Deploy environment.
  • Setting the branch protection policy to allow writes and tags from at least one developer in the organization.

Comment thread .github/workflows/deploy.yml Resolved
Comment thread .github/workflows/deploy.yml Resolved

@funkyfuture funkyfuture left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. you could also bump to a dev version that can then be used to test the workflow.

@nir0s
nir0s merged commit 39b1481 into python-distro:master Jul 1, 2021
@nir0s

nir0s commented Jul 1, 2021

Copy link
Copy Markdown
Collaborator

@sethmlarson, the API key is in place.

@sethmlarson
sethmlarson deleted the gha-deploy branch July 1, 2021 17:57
@sethmlarson

Copy link
Copy Markdown
Contributor Author

Awesome! We can test this with the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants