Skip to content

Combine branch and tag push into a single push #1187

Open
@ddeepwell

Description

@ddeepwell

Feature Request

Description

I was puzzled at first why I had two separate CI/CD pipelines being triggered when using the command semantic-release version. After a little digging, lines 673-690 in the python-semantic-release/src/semantic_release/cli/commands/version.py file show that two independent pushes are made; one for the branch and one for the tag.

Using plain git, these can be combined into a single push, so I'm wondering if it would be possible to check for commit_changes and create_tag to both be true and execute a single git push. If either are untrue, then the current functionality would be used.

I am using version 9.19.1.

Use cases

This would reduce some of the network traffic and slightly speed up the command.

For those who run CI/CD pipelines triggered by individual git pushes, this would reduce duplicate pipelines. For context, I use GitLab, but run semantic-release manually, outside of a CI/CD pipeline.

Possible implementation

See the description.

Alternative solutions

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedPrevent from becoming stalefeatureA new feature or a feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions