Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add releaser tokens to the repo #147

Closed
jtpio opened this issue Aug 2, 2023 · 9 comments
Closed

Add releaser tokens to the repo #147

jtpio opened this issue Aug 2, 2023 · 9 comments

Comments

@jtpio
Copy link
Member

jtpio commented Aug 2, 2023

As a follow-up to #145, we will be making a new release of the extension that is compatible with JupyterLab 4.

Currently the repo does not have any token in the GitHub Actions secrets:

image

Which means using the workflows from the repo and https://github.com/jupyterlab-bot will likely not work.

If jupyterlab-github is already configured to support the trusted publisher on PyPI, we could also use this instead of the PyPI release token.

cc @blink1073 @fcollonval @JasonWeill who I think have access to the shared vault. If you can help with this that would be great, thanks! I don't have access to the bot tokens.

@blink1073
Copy link
Contributor

I added the trusted publisher integration and the NPM token, working on admin github token now:

image

@blink1073
Copy link
Contributor

Okay, should be ready:

image

@jtpio
Copy link
Member Author

jtpio commented Aug 2, 2023

Thanks!

I'll try running the workflows now.

@jtpio
Copy link
Member Author

jtpio commented Aug 3, 2023

Looks like the workflow was missing:

permissions:
      id-token: write

image

Will add it and start again.

This was referenced Aug 3, 2023
@jtpio
Copy link
Member Author

jtpio commented Aug 3, 2023

Now the error is:

requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://pypi.org/_/oidc/github/mint-token

image

@fcollonval
Copy link
Member

This means that the package on PyPI is not configure to use a trusted publisher.

Someone with enough rights on https://pypi.org/project/jupyterlab-github/ should do it, or you should comment the id token and add a PyPI token.

@jtpio
Copy link
Member Author

jtpio commented Aug 3, 2023

From #147 (comment):

I added the trusted publisher integration and the NPM token, working on admin github token now:
image

Could it be because of a workflow name mismatch?

@blink1073
Copy link
Contributor

Yes, the workflow name must be the same, I updated it. The workflow also needs to be set to run in the release environment (which will have to be created and configured in the workflow):

image

@jtpio
Copy link
Member Author

jtpio commented Aug 3, 2023

Thanks @blink1073!

Looks like it worked this time after adding the environment to the workflow (#152): https://pypi.org/project/jupyterlab-github/4.0.0/

Closing as fixed.

@jtpio jtpio closed this as completed Aug 3, 2023
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

No branches or pull requests

3 participants