Skip to content

Publish Python packages on pypi on every git tag#761

Merged
alexcrichton merged 3 commits intobytecodealliance:masterfrom
OrangeTux:deploy-python-wheel-to-pypi
Jan 6, 2020
Merged

Publish Python packages on pypi on every git tag#761
alexcrichton merged 3 commits intobytecodealliance:masterfrom
OrangeTux:deploy-python-wheel-to-pypi

Conversation

@OrangeTux
Copy link
Contributor

@OrangeTux OrangeTux commented Jan 6, 2020

This commit adds support for publishing the wasmtime Python packages to the Python Package Index (pypi) on every release.

This PR consists of 2 commits. Most work is done in 1f51bed.
In order to test my changes I had to introduce things which I undid it the last commit 970313b

  1. Publish the package to the pypi test index.
  2. Make the CI job run on my feature branch.

You can see the logs of the CI job in here.

Note The CI job requires an access token in order to upload the packages to pypi. The token can be obtained in the settings menu of the package. See the screenshot:

Screenshot_2020-01-06_14-50-16

This token must be added to Github as a secret by the name pypi_password as is shown in the screenshot.
Screenshot_2020-01-06_14-53-26

Fixes: #312

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks!

@yurydelendik I think you originally published these packages? Would you be willing to configure the token?

publish:
name: Publish
needs: [doc_book, doc_api, wheels, build]
needs: [doc_book, doc_api, wheels, build, wheels]
Copy link
Member

Choose a reason for hiding this comment

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

I think wheels is already listed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oeps! Fixed

find dist/ -name '*.whl' -type f -exec cp '{}' tmp/whl -v \;

- name: Publish Python wheels on Pypi
uses: pypa/gh-action-pypi-publish@master
Copy link
Member

Choose a reason for hiding this comment

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

Is there perhaps a tag or a revision we could use instead of relying on master?

(that way if this changes upstream we don't break and we have time to update ourselves)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, version 1.0.0a0 is the latest (and only) version. I'll change it.

@OrangeTux OrangeTux requested a review from alexcrichton January 6, 2020 18:46
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Looks good to me! Let's get the private token set up before merging though, which I think needs coordination with @yurydelendik

@alexcrichton alexcrichton merged commit ad7d484 into bytecodealliance:master Jan 6, 2020
@alexcrichton
Copy link
Member

Ok should be configured and good to go!

@OrangeTux
Copy link
Contributor Author

Great!

data-pup pushed a commit to data-pup/wasmtime that referenced this pull request Jan 8, 2020
* Publish Python wheels on pypi on every git tag

* Remove config required for testing

* Pin workflow version & remove duplicate dependency
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.

Automatically deploy new tagged versions to PyPI

2 participants