Vita Sokolova
09/27/2024, 1:24 PMLIBRARY_VERSION
and push the new value to my repository?Vita Sokolova
09/27/2024, 1:27 PMtouchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildautoversion.yml@v1.1
and AUTOVERSION
always had a new valuekpgalligan
09/27/2024, 6:26 PMkpgalligan
09/27/2024, 6:27 PMkpgalligan
09/27/2024, 6:28 PMkpgalligan
09/27/2024, 6:35 PMkpgalligan
09/27/2024, 7:42 PM- uses: touchlab/read-property@0.1
id: versionBasePropertyValue
with:
file: ./gradle.properties
property: "YOUR_VERSION_BASE_PROPERTY"
- uses: touchlab/autoversion-nextversion@main
id: autoversion
with:
versionBase: ${{ steps.versionBasePropertyValue.outputs.propVal }}
- name: Build Main
run: ./gradlew kmmBridgePublish -PAUTO_VERSION=${{ steps.autoversion.outputs.nextVersion }} blah blah blah
Then in the project Gradle scripts, you want to check for the passed-in AUTO_VERSION
, which should only happen in CI, and set Gradle's version with that vs whatever you'd use otherwise.
the versionBasePropertyValue
task just reads a value from gradle.propreties
that is the base version. Task autoversion
uses the base to calculate the next version.
So, conceptually not complicated, but the whole process needs a blog post or doc, and probably needs a bit of testing to make sure I'm not missing anything in the above description.