Closed drodarie closed 1 month ago
If this PR works, we might want to drop bump-my-version
Sorry, seemed that with my last commit the changes are not correctly pushed
@drodarie status update? Is this ready to merge? Have you tested this workflow on another repository? Does it work? :)
Hi @Helveg, yes the pipeline should be ready to be merged (although it is difficult to test Githib Actions that triggers on the master branch). I created a test repository on my account here with the same Github Actions pipeline: https://github.com/drodarie/test_actions
Ok, if you can confirm that in that test repository the following things happen, then I'm willing to merge and see what happens:
main
:
bump_my_version
in the Python source code, and an auto changelog are both put in a single skip-ci
commit, tagged, and pushed. (I would want all of this to be in 1 commit if possible, with a message Automatic release: 4.2.0 ↦ 4.3.0
)The appropriate next semver is calculated from the conventional commits
Yes look at the logs of Get Next Version
from this run or this one
This next semver is bumped by bump_my_version in the Python source code, [...]
Yes, look at the logs of Bump version in Python project
from this run
An automatic commit will be pushed and tagged with the change of version but at this stage the changelog is not updated because we need the new tag to be pushed (see logs in Commit version change
and action-create-tag
from the run).
Then, the actions automatically create a changelog from the code changed between the tags (Update CHANGELOG
from this run), they produce a Github release (Create Release
from the run) and commit the changes to CHANGELOG.md
(Commit CHANGELOG.md
from the run).
So technically it is done in 2 commits but we need the tag for the release and it has to be attached to the bump-my-version
commit. During this whole procedure, no other CI action will be triggered (no action is triggered by an action).
The artifact is built and deployed to PyPI
This part is not fully working in my test case because there is already a test-actions
python library on test-pypi
and so my action is failing but the logs show that it contacts the server.
Describe the work done
With this PR, we introduce conventional commits together with a pipeline to automatize a release workflow triggered by push on the
main
branch This includes:A1
) to automatically produce a new tag based on PR or commitA2
) to produce a release and its changelog based on the latest changes since last tag. This action will also update theCHANGELOG.md
file automatically and in a separate commit.A3
) so that it works with build instead of setuptoolsA1
,A2
andA3
as actions in a workflow run can’t trigger a new workflow run.Slight drawback with the new system: certain git actions like merging branches produces an automatic commit message which is not matching the commit convention. This will require the user to manually write these commit messages.
Added developer guidelines to documentation
List which issues this resolves:
Closes #860
📚 Documentation preview 📚: https://bsb--864.org.readthedocs.build/en/864/