Semantic release workflow for bugfixes in master

58 views Asked by At

we recently transitioned to Semantic Release and it's great - till we must make some fast hotfix.

Basically we have 3 stages:

  • development branches
  • the "dev" branch
    • where the development branches are merged yo and serves for testing & integration with frontend
  • the "master" branch
    • where "dev" is merged to
    • this is the release branch

Now, when everything is OK, the Semantic Release

  • after every merge to dev, releases pre-release
    • raises version based on commits with the "rc" suffix
    • updates pyproject.toml with this version and commits it to the dev branch
    • creates tag in git
  • after every merge to master, releases the release
    • raises version without adding the suffix rc
    • updates pyproject.toml with this version and commits it to the master branch
    • creates tag in git
    • creates changelog based on commits and commits it to the masyer btanch
    • backmerges to the dev
    • notifies us with the changelog via the Slack

(pyproject.toml = config file for python dependencies and Poetry manager)

Now that's great and works as expected. But when we find (or is reported) the bug, we must make the bugfix as quick as possible, so we usually (when the bug isn't too complex) skip dev branch and merge directly to master.

This usually also works quiet smooth, but sometimes, it happens that there are already some prereleases (e.g. new features) on dev and this will break the workflow. Now the dev is ahead of master, cannot be backmerged (as I've written, even master creates commits woth changelog, etc.).

Any ideas how to solve this?

Thanks.

0

There are 0 answers