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

Define strategy of versioning #236

Closed
jraska opened this issue May 14, 2020 · 8 comments
Closed

Define strategy of versioning #236

jraska opened this issue May 14, 2020 · 8 comments

Comments

@jraska
Copy link
Owner

jraska commented May 14, 2020

  • How to automatically update version?
  • How to bump major/minor etc.
  • One option is using the tag
@lordcodes
Copy link

I have a set of Gradle tasks: prepareRelease[Major|Minor|Patch]. They increment the appropriate part of the version stored in a Kotlin file in buildSrc. They also need to set lower parts of version to 0.

Increment minor from 0.1.2 goes to 0.2.0 for example.

To perform a release, I then have a Gradle task which uses the version in that file to create a Git tag. CI has a workflow that is triggered by Git tag and does a release to Google Play internal channel.

The release workflow uses Gradle tasks inside the project to do each part, so that if I really needed to (issues with CI) I would do all the release locally (provided I put the secrets where they needed to be).

My release workflow also does other things that are needed such as creating Jira release, adding that to all the tickets contained in the release, marking it as released, then posting all the Jira task names and IDs as release notes message to a Slack channel.

I found it very interesting putting it all together! Will happily show you what I have sometime, if you are interested.

@jraska
Copy link
Owner Author

jraska commented May 16, 2020

Yes I'm definitely interested! Thanks a lot for the notes :)

I tried to think about the requirements I have:

  1. Complete release to Google Play and all other things like Jira should happen by executing single task - publishRelease
  2. It should be executable both from local environment and CI, also needs to be able to trigger manually on CI
  3. It should be clear in git which version a commit points to.
  4. Possibly 100% of all logic in Gradle
  5. The only manual action should be promoting to Beta and staged rollout. - These could be automated as well.
  6. As trivial strategy as possible.

One thing related to 3. is if the CI needs to modify anything in VCS or not? Because I was thinking about variants on how to avoid this.

The thing is where this version number should be - one options is the version number in file as you mention, other one we used in the past is having the latest git tag as this reference and push the next tag based on this. We can discuss that as well :)

@jraska
Copy link
Owner Author

jraska commented Mar 18, 2021

Automatic release

Will try this with GitHub actions :)

@lordcodes
Copy link

lordcodes commented Mar 18, 2021 via email

@jraska
Copy link
Owner Author

jraska commented Mar 18, 2021

@lordcodes do you use Milestones or can't we somehow provide backward reference into each PR to release directly? The Milestone feels like a patch of this not being possible :)

@lordcodes
Copy link

lordcodes commented Mar 18, 2021 via email

@jraska
Copy link
Owner Author

jraska commented Mar 18, 2021

Ah ok :) thanks

@jraska
Copy link
Owner Author

jraska commented Mar 21, 2021

Resolved by #445

Example release: https://github.com/jraska/github-client/releases/tag/0.24.0
Screenshot 2021-03-21 at 21 55 58

Version is bumped for following release: example automatic commit: 88c0d9a
Screenshot 2021-03-21 at 21 51 43

@jraska jraska closed this as completed Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants