AlexStormwood / UnityAutomatedSemver

Action to increment relevant version numbers in a Unity project in your Github Action workflows.
MIT License
9 stars 1 forks source link

Feature request: Allow for suffix #10

Closed eproulx-bb closed 2 months ago

eproulx-bb commented 3 months ago

My version scheme includes a suffix that explains the flavour of the game: alpha, beta, demo, final, etc.

So for example 1.0.92 beta.

It would be nice if this action would preserve the text after the version number.

AlexStormwood commented 3 months ago

Great idea!

I'm gonna refactor this action a bit in the coming weeks, and will make sure this feature is part of that.

AlexStormwood commented 2 months ago

This is now possible as part of v2.0.0, though it may require a bit of legwork from you to sort out how that'll work in your action workflows.

Experiment with using the releaseLabel and buildLabel properties of the action, and set up a custom semver format syntax - this type of thing:

            - name: Find ProjectSettings.asset & increment its bundleVersion number
              uses: AlexStormwood/UnityAutomatedSemver@v2.0.0 
              id: semver-update
              with:
                  updateMode: "no-bump" # Anything other than major, minor, patch or quad will actually NOT do a number bump. 
                  releaseLabel: "rc1"
                  buildLabel: "nightly" # Even if the updateMode is invalid, you can still add a release and/or build label to the output. 
                  bundleVersion: "{major}.{minor}.{patch}-{releaseLabel}+{buildLabel}" #Specify a custom format for the semver to make sure your data comes through.
                  projectSettingsPath: "ProjectSettings/ProjectSettings.asset" 

I'm gonna close this issue as it's functionally possible to do the suffix stuff now - but if you get stumped sorting out a workflow, feel free to jump back here. Hope it helps!