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

Automate releases #1138

Open
1 of 4 tasks
getzze opened this issue Jun 25, 2024 · 3 comments
Open
1 of 4 tasks

Automate releases #1138

getzze opened this issue Jun 25, 2024 · 3 comments

Comments

@getzze
Copy link
Collaborator

getzze commented Jun 25, 2024

Several things could be done to ease the process of making a new release:

  • protect the main branch and review the github actions to ensure the linter and tests pass before a release.
  • use pre-commit.ci to automatically fix linter and formatting problems Add pre-commit hook #1075 (comment)
  • show a coverage report on coverage failure
  • automatic building of changelog (using towncrier like attrs ?)
@wujekbogdan
Copy link

Have you considered Python Semantic Release? It's inspired by the great semantic-release tool for JS.

@getzze
Copy link
Collaborator Author

getzze commented Jul 26, 2024

I didn't know it, thanks. I looked at the documentation and I found it quite confusing. From what I understood it uses commit messages to decide of the next version? But does it automate the release on Github?

At the moment I'm thinking of a solution based on setuptools_scm and python scripts to do that.

@wujekbogdan
Copy link

You're getting it right. The idea is that the tool determines the version number based on commit messages. It's often implemented in such a way that you squash-merge a PR and use its commit message as a source of truth.

Then you use that information as input for a GitHub Action that updates the GitHub tag and performs the actual release. See: https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html

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

No branches or pull requests

2 participants