-
Notifications
You must be signed in to change notification settings - Fork 1
Feature: create github release on tag push #1
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
Conversation
I can't see any test run here, apart from the DCO check. Am I missing something? |
The new workflow only gets run when a new tag is pushed in the repo |
4ed8c40
to
c3c1c32
Compare
Here's an example of triggered workflow and the release it created: |
c620bd4
to
6bdbcd6
Compare
Maybe I'm not authorized to run the workflows? they are running well on my fork: https://github.com/psafont/python-project-template/actions |
This allows any tool to download build dependencies and package the code. Include setuptools_scm to generate package version from git Signed-off-by: Pau Ruiz Safont <[email protected]>
Signed-off-by: Pau Ruiz Safont <[email protected]>
Drafted because it's not running the tests here, and the zizmore check is failing on my fork |
a121590
to
21f4041
Compare
An action to release the package to PyPI could be done, but needs a prior setup in PyPI to allow the upload, see https://docs.pypi.org/trusted-publishers/adding-a-publisher/ ``` publish-pypi: name: Publish Python release to PyPI runs-on: ubuntu-latest needs: release environment: pypi permissions: contents: read id-token: write steps: - name: Retrieve python distribution artifacts uses: actions/download-artifact@v4 with: name: artifacts path: dist/ - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 ``` Signed-off-by: Pau Ruiz Safont <[email protected]>
uv was printing a warning stating that using the tilde in this way is ammbiguous. The new version range is precise Signed-off-by: Pau Ruiz Safont <[email protected]>
Everything is working fine now: https://github.com/psafont/python-project-template/actions/runs/16720167314 |
Aside from adding metadata to pyproject.toml to be able to create a package and upload it to the github release, it also adds a default license (GPL), and tweaks the workflows.
I think the template should also provide some kind of testing, as well as adding it to a workflow, maybe for another PR