Closed abitrolly closed 2 years ago
What is it basing the release on, current HEAD
? I would rather like a release upon a tag and a successful test of that tag, otherwise it is way too easy to do something by accident, or are there other contingencies for that?
Most likely HEAD
from master
, but I haven't checked. There is no way to release upon a tag, because GitHub doesn't generate any events when tag is pushed (in https://github.com/yakshaveinc/linux/pull/44).
The most simple approach is to add a check that release is done from master
branch, and push the button only after tests in master
pass.
It is also possible to move tests into reusable workflow and run them before packing.
And it is also possible to detect if version in master
branch is changed compared to PyPI and start the release job in this case.
@fschulze
I would rather like a release upon a tag and a successful test of that tag
Reworked to release upon a tag given the instruction at https://github.com/pypa/gh-action-pypi-publish
Make Publish depend on successful test run. The only thing I am not sure is that tag test works.
https://stackoverflow.com/questions/58457140/dependencies-between-workflows-on-github-actions
I had to add some changes to make it work and for now it publishes to https://test.pypi.org/project/sqlalchemy-schemadisplay/
Good news. ) Now waiting for updated version at https://pypi.org/project/sqlalchemy-schemadisplay/
This adds a button to release the package to https://github.com/fschulze/sqlalchemy_schemadisplay/actions
Requires to set PYPI_API_TOKEN in repository secrets in repository settings.