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 release process #1665

Open
kayman-mk opened this issue Oct 26, 2023 · 2 comments
Open

Automate release process #1665

kayman-mk opened this issue Oct 26, 2023 · 2 comments

Comments

@kayman-mk
Copy link

kayman-mk commented Oct 26, 2023

As discussed in #1646 it would be helpful to automate the release process of the Errbot to free up some of the maintainers' resources and make the whole process more comfortable and faster.

Let me briefly outline my ideas how to do that:

  1. Enforce conventional commits. This enables the release process to automatically set the new release version number. Tool: amannn/action-semantic-pull-request. Enforces the correct title of the PR. The workflow fails in case the title is incorrect.
  2. Ensure to have the PR title and description used for the commits in the default branch. Otherwise it might be possible to create a commit which does not follow the semantic commit rules. Tool: GitHub project settings (General > PR).
  3. Ensure squashing the PR to not add non semantic commits accidentally. Tool: GitHub settings (General > PR)
  4. Use release-please to create a release, i.e. to tag the default branch with a new version number. Release Please creates a PR to do a release. So we can simply modify the errbot/version.py file and add the changelog. This way multiple changes can be integrated into one release too. So there is no need to release every single commit to PyPi.
  5. Automate setting the release version in the errbot/version.py. Should be possible within the release workflow.
  6. Let Release Please maintain the changelog. This, of course, requires good PR titles/descriptions. Might be enabled by default. Not sure.
  7. Add a workflow to automatically release to PyPi. Tool: GitHub workflow.

If you agree I will start working from top to bottom and create the necessary PRs. What do you think @sijis @nzlosh?

@nzlosh
Copy link
Contributor

nzlosh commented Oct 27, 2023

@sijis handles errbot releases, so I'd expect he'll be able to confirm with the process he uses. I'm all for having an automated (or as much is possible) release process.

@kayman-mk
Copy link
Author

Got everything up an running and released version 7.0.0 including everything up to commit 0080eff (2023-10-30).

Docker image: https://github.com/Hapag-Lloyd/errbot/pkgs/container/errbot-hl/149130296?tag=7.0.0
PyPi package: https://pypi.org/manage/project/errbot-hl/release/7.0.0/

GitHub project: https://github.com/Hapag-Lloyd/errbot

Release process is 100% automatic now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants