gazebosim / gz-mujoco

25 stars 4 forks source link

Support PYPI publishing in github actions #40

Closed j-rivero closed 2 years ago

j-rivero commented 2 years ago

This PR needs #39 before in order to have a main setup.py to call.

It basically setup a python environment with all the tools needed (particularly twine to make the upload to PYPI) and do the same steps that one can do it for uploading manually a release.

The PR reacts to the event of creating a GitHub release . If we prefer to react to a string found in a git tag (something like the patter release_) we could use (insteda of push - release- types):

on:
  push:
    tags:
    - 'release_*'

To finish the setup, we would need to add the credentials for the PYPI upload: PYPI_USERNAME and PYPI_PASSWORD with their correspondent values in https://github.com/gazebosim/gz-mujoco/settings/secrets/actions/new. I would recommend to create PYPI token and use it in PYPI_PASSWORD.

I've run a test to check that everything is fine until the point of the upload, that fails because of missing credentials. Seems fine.

codecov[bot] commented 2 years ago

Codecov Report

Merging #40 (1df0b3b) into main (2d5df5e) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #40   +/-   ##
=======================================
  Coverage   95.12%   95.12%           
=======================================
  Files          24       24           
  Lines        1169     1169           
=======================================
  Hits         1112     1112           
  Misses         57       57           

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 2d5df5e...1df0b3b. Read the comment docs.