Context
When there's a merge to a feature branch I want the patch to be updated. When there's a merge to main I want to bump the minor. Similarly I might want to update Major in another branch.
My Current Solution
I detect and set the semver update type in a job and push that info down in the workflow
- name: Determine semver update type based on branch
id: determine-semver-update
run: |
if [[ ${{ github.ref }} == 'refs/heads/main' ]]; then
echo "::set-output name=semver-update-type::minor"
elif [[ ${{ github.ref }} == 'refs/heads/feature' ]]; then
echo "::set-output name=semver-update-type::patch"
fi
- name: Find ProjectSettings.asset & increment its bundleVersion number
uses: AlexStormwood/UnityAutomatedSemver@v1.1.1
id: semver-update
with:
semver-update-type: ${{ steps.determine-semver-update.outputs.semver-update-type }}
project-settings-path: 'ProjectSettings/ProjectSettings.asset'
should-add-ms-store-trailing-zero: true
Recommendation
- name: Find ProjectSettings.asset & increment its bundleVersion number
uses: AlexStormwood/UnityAutomatedSemver@v1.1.1
id: semver-update
with:
semver-update-mode: branch #[ options : 'branch','Regular']
major: 'release' [Required if branch selected]
minor: 'main' [Required if branch selected]
patch: 'feature' [Required if branch selected]
should-add-ms-store-trailing-zero: true
Something like this would be really nice
Context
When there's a merge to a feature branch I want the patch to be updated. When there's a merge to main I want to bump the minor. Similarly I might want to update Major in another branch.
My Current Solution
I detect and set the semver update type in a job and push that info down in the workflow
Recommendation
Something like this would be really nice