-
Notifications
You must be signed in to change notification settings - Fork 8
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
create PyPI API token and encrypt "secret" for Github organization #1
Comments
Hmm, I think this can be accomplished with a regular PyPI token scoped to this project, and stored as a repo-level secret (not org-level). I have done exactly that and published to PyPI with GitHub Actions on the I just added a repo-level |
ok thank you, I will try now to push a tag and see if that works |
btw, I didn't know about pyots, cool :) |
It partly worked: https://github.com/adobe-type-tools/cffsubr/runs/693818612 But you are hitting the same problem I did in pyots: pypa/gh-action-pypi-publish is only supported under Linux. I ended up building the wheels in each of the individual platforms and attaching the assets for release, then a separate job that retrieves the assets and does the PyPI publishing step. |
btw, it worked! only that the action from pypa that I used to publish the wheels only supports linux for some reasons.. I'll just switch to calling twine manually myself, no big deal. |
I just used twine and it works now |
almost.. the second windows build failed because setuptools_scm thinks the repository is "dirty" and thus doesn't assign a final version string and PyPI rejects the upload. |
@josh-hadley I don't have a windows machine to test this locally, but I have a hunch that the afdko's Could somebody try to run |
weird.. after I added a git clean command just before each build, it's working now. This seems to confirm my hyphothesis that the afdko .gitignore is leaving behind some dirty files. I recommend that you take a look at that at some point. Closing this for now |
OK thanks, yeah this sounds familiar, I think Miguel had some headaches related to this a while ago on one of the AFDKO CIs. |
I just finished setting up Github Actions so that it builds the wheels for mac, linux and windows using cibuildwheel. So far so good.
Now I tried to also set up automatic deployment to PyPI on tags, however I stumbled on a permissions obstacle and need help from one of the admins of the "adobe-type-tools" Github organization.
Basically, we need an authentication token for PyPI, and then we need to encrypt the latter using Github "secret variables". However, since this repository is not a normal user repository but is part of a Github organzation, these secrets are administered by the organization's admins, and I don't have access to those settings as an external collaborator.
So we need two things:
create PyPI API token for the cffsubr project follow the instructions at https://pypi.org/help/ (search "use API tokens to authenticate with PyPI").
encrypt the generated token as an organziation secret following instructions at https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-an-organization
You should name the encrypted secret
pypi_password
so that it will be automatically recognized by my GH actions setup:cffsubr/.github/workflows/build_wheels.yml
Line 63 in 35db3b2
Thank you!
The text was updated successfully, but these errors were encountered: