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

GitHub Action - pypi publish on new release #262

Merged
merged 3 commits into from
Feb 21, 2020

Conversation

lucagiove
Copy link
Member

Create pythonpublish.yml

@lucagiove
Copy link
Member Author

cannot work I've no permissions for actions on github

@lucagiove lucagiove closed this Feb 12, 2020
@bulkan
Copy link
Collaborator

bulkan commented Feb 12, 2020

@lucagiove if you need help setting this I can.

Also I checked to see why you don't have access to Github Actions and can't seem to work it.

I could try adding you back as admin?

@lucagiove
Copy link
Member Author

Looking at github documentation I need to see the settings button where I could add credentials for pypi.
Thanks!

@bulkan
Copy link
Collaborator

bulkan commented Feb 12, 2020

Sorry I tried removing and adding as collaborator again to see if I could add you as admin :(

@lucagiove
Copy link
Member Author

by the way you could add your pypi credentials under Settings > Secrets in order to have this working:

        TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
        TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

never tried but it's the official github action to publish on pypi it should work

@bulkan
Copy link
Collaborator

bulkan commented Feb 13, 2020

Can i use a PyPI token instead ?

https://pypi.org/help/#apitoken

@lucagiove
Copy link
Member Author

Seems twine doesn't support it..

twine upload --help | egrep -i "USER|PASS|TOKEN"
                    [-s] [--sign-with SIGN_WITH] [-i IDENTITY] [-u USERNAME]
                    [-p PASSWORD] [-c COMMENT] [--config-file CONFIG_FILE]
  -u USERNAME, --username USERNAME
                        The username to authenticate to the repository
                        TWINE_USERNAME environment variable.)
  -p PASSWORD, --password PASSWORD
                        The password to authenticate to the repository
                        TWINE_PASSWORD environment variable.)

@lucagiove lucagiove reopened this Feb 14, 2020
@bulkan
Copy link
Collaborator

bulkan commented Feb 18, 2020

@lucagiove I've added these secrets. I'm using TWINE_USERNAME=__token__ and TWINE_PASSWORD=api-key. This is according to pypa/twine#482 (comment)

@bulkan bulkan marked this pull request as ready for review February 18, 2020 04:24
@lucagiove
Copy link
Member Author

Cool! Thanks let's try it :)

@lucagiove lucagiove merged commit cc093b2 into master Feb 21, 2020
@lucagiove lucagiove deleted the lucagiove-pypi-publish-action branch March 5, 2020 10:43
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.

2 participants