c4urself / bump2version

Version-bump your software with a single command
https://pypi.python.org/pypi/bump2version
MIT License
1.05k stars 134 forks source link

Add a GitHub Action? #188

Open vmarkovtsev opened 3 years ago

vmarkovtsev commented 3 years ago

We've recently developed https://github.com/marketplace/actions/bump2version-action I think that there is an option to move the GHA code inside this repository and delete FragileTech/bump-version. WDYT?

florisla commented 3 years ago

So we would add it as documentation?

Personal opinion: It think this would belong in a separate repository, but it's definitely nice to have this around.

1Mark commented 2 years ago

I definitely feel it's worth having this in the readme of this repo, bump2version is good locally, but amazing when it's part of a CICD pipeline.

florisla commented 2 years ago

Do you have some examples of the possibilities in a pipeline? E.g. automatically turn 'beta' into 'release' when a tag is present?

1Mark commented 2 years ago

I think it really depends on the workflow, I'm not that familiar with github actions.

But for me something as simple as just running bump2version --new-version ${{ github.ref_name }} minor would suffice, I know https://github.com/joke2k/faker uses bump2version but their use of it is a bit too fancy for me.

1Mark commented 2 years ago

I'm trying to do this atm will let you know what I come up with.

1Mark commented 2 years ago

@florisla I don't have an example of what you asked for but here is what I've implemented https://github.com/loicleyendecker/deeppath/pull/10

It uses the name of the tag from (e.g) https://github.com/c4urself/bump2version/releases/new

Then it bumps the version for you part in the CI

vmarkovtsev commented 2 years ago

I've just encountered a sed surrogate in a public project: https://github.com/spec-first/connexion/blob/main/.github/workflows/release.yml#L22 Looks familiar, ain't it.

1Mark commented 2 years ago

I've just encountered a sed surrogate in a public project: https://github.com/spec-first/connexion/blob/main/.github/workflows/release.yml#L22 Looks familiar, ain't it.

Lol https://github.com/spec-first/connexion/blob/2.13.0/connexion/__init__.py#L49

I mean. Stuff like this really upsets me, there are about 1000 ways this is implemented, none of which are remotely standardized. Whereas, in my eyes, this should be something available out of the box. Why isn't there a PEP for this!?