How to increment version prior to publishing in GitHub packages. We update version attribute everytime before we do ./gradlew publish
Snippet from build.gradle
group = 'com.company.user'
version = '0.0.1'
description = """user-service"""
If we build and publish using GitHub action, how do I auto increment version prior to running the publish command
I used the Gradle Release Plugin (https://github.com/researchgate/gradle-release) successfully.
It checks for SNAPSHOT-Dependencies before the release and also has a built in autoVersioning (look for the Working in Continuous Integration in the docs). If you need, you can specify the versions manually, but you don't have to.
This is not specially made for GitHub actions, but from my experience with such vendor-bindings for projects where you plan long-term development or support I would not work with special plugins there - it will make a potential migration to another system harder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With