DSD-DBS / py-capellambse

A Python 3 headless implementation of the Capella modeling tool.
https://dsd-dbs.github.io/py-capellambse/
Apache License 2.0
53 stars 11 forks source link

ci: Only trigger pypi push on release tag #433

Closed ewuerger closed 5 months ago

ewuerger commented 5 months ago

The pipeline on master is unsuccessful because only non-dev versions can be uploaded to PyPI. This fixes the situation by only triggering the pypi stage when a release tag was created.

Wuestengecko commented 5 months ago

The pipeline on master is unsuccessful because I force pushed to fix the commit message of the latest merge, and PyPI doesn't let you reupload the same version twice. :)

ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
         File already exists. See https://pypi.org/help/#file-name-reuse for
         more information.

Regardless, it might not be necessary to upload all dev versions to PyPI after all. Space there is limited, and I'm not sure anymore why we did that in the first place (probably something to do with misconfigured firewalls or something). Do you have any idea? If not, I'd maybe actually merge this and see what breaks 🙃

ewuerger commented 5 months ago

Do you have any idea? If not, I'd maybe actually merge this and see what breaks 🙃

No idea why we allowed to run the pypi upload on any push to main or tag creation. Maybe an and (&&?) is correct here? It isn't breaking anythin. This is the version of the workflow we use in the capella2polarion, rest-api and context-diagrams now. It works :)

Wuestengecko commented 5 months ago

Maybe an and (&&?) is correct here?

Definitely not, because the ref either is refs/heads/master or starts with refs/tags/v, but never both at the same time ;)

Publishing pre-releases was a deliberate choice (81cccd844efc3841d56b328999c85bcd07a00271), but the commit doesn't have a reason either. Let's just go through with this PR. The way to install pre-releases henceforth shall be to just use the git master directly like for any other repo.

But first we'll have to somehow deal with the Sphinx failure.