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

CI: Create Action to publish to PyPI on release #1169

Merged
merged 2 commits into from
Feb 23, 2022

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Feb 22, 2022

Creates a GitHub Action workflow that builds and published packaged distribution files to PyPI when a release is published in GitHub.

It builds and deploys the same two files as currently deployed to PyPI with 0.9.0:

  • Mesa-0.9.0.tar.gz (Source Distribution)
  • Mesa-0.9.0-py3-none-any.whl (Built Distribution)

A version to test: package.zip

It runs whenever a GitHub Release is published, either from an existing tag of when creating a new tag when creating the release through the GitHub CLI or web interface (mesa/releases). See Managing releases in a repository for more information.

TODO: The secret used in ${{ secrets.PYPI_API_TOKEN }} needs to be created on the settings page of your project on GitHub. See Creating & using secrets. All maintainers can do so, see Creating & using secrets.

At some point (in another PR) we should probably switch to pyproject.toml as defined in PEP 518.

Example of creating a GitHub release, on which this workflow runs:
Screenshot_712

Creates a GitHub Action workflow that builds and published packaged distribution files to PyPI when a release is published in GitHub.

The secret used in ${{ secrets.PYPI_API_TOKEN }} needs to be created on the settings page of your project on GitHub.

At some point we should probably switch to pyproject.toml as defined in PEP 518.
@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #1169 (0cbce75) into main (56c598e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1169   +/-   ##
=======================================
  Coverage   89.27%   89.27%           
=======================================
  Files          19       19           
  Lines        1268     1268           
  Branches      254      254           
=======================================
  Hits         1132     1132           
  Misses        100      100           
  Partials       36       36           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56c598e...0cbce75. Read the comment docs.

@rht
Copy link
Contributor

rht commented Feb 23, 2022

All maintainers can do so

Only those who can get the PyPI token can do.

@rht
Copy link
Contributor

rht commented Feb 23, 2022

LGTM

@tpike3 tpike3 merged commit 06dde9c into projectmesa:main Feb 23, 2022
@EwoutH
Copy link
Member Author

EwoutH commented Feb 23, 2022

@tpike3 Thanks for merging! Did you add the PYPI_API_TOKEN secret?

@tpike3 tpike3 added this to the March Dev milestone Feb 26, 2022
@EwoutH
Copy link
Member Author

EwoutH commented Mar 24, 2022

@tpike3 Can you confirm that the PYPI_API_TOKEN was added as a secret to this repository?

@tpike3
Copy link
Member

tpike3 commented Mar 24, 2022

Hmmm...I cannot, I do not have those authorities. @jackiekazil can you confirm if PYPI_API_TOKEN was added. (I did talk to Igor and Natalie thought... thanks)

@rht
Copy link
Contributor

rht commented Jul 24, 2023

The GH Actions is not working for 2.1.0 release: https://github.com/projectmesa/mesa/actions/runs/5637000752/job/15269631728.

@rht
Copy link
Contributor

rht commented Jul 24, 2023

Raised #1740.

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