Using a mix of package id and auto increment in release creation


We currently have a decoupled setup between build number and release number. I.e. Project could have build number 1.2.2342.1 and release number 0.1.234.

We would like to use the build number (i.e. package nuget number) plus a auto incremented value.


A package with id 1.0.17002.4 (which is our build number) is pushed to the Octopus server, a release called 1.0.17002.4.0 should be created.

If a manual release is created with the same package (e.g. variables have changed etc.) next version number should be 1.0.17002.4.1

and so on.

Is it possible to reference the package nuget id in the Release number template?

Or is there another way to achieve what we would like?

Essenstially PackageVersion.AutoIncrementedValue

Kind Regards

Hi Thomas,

Thanks for getting in touch! I had a chat with the developers about this, it looks like splitting the package number and build number that way is not going to work in Octopus unfortunately.

It looks like the only option to have it work similar to what you want is to select the Use the version number from an included package feature under Release versioning in your project settings. After you have set that, you can increment it by placing a .i or simply a number you wish after the release number when creating the release. I have attached a screenshot showing where this can be done.

Also, something to note is that Octopus follows strict SemVer rules and 1.0.17002.4.0 would not be handled by Octopus. You would need to drop it down to 3 decimals leaving a 4th for the incremental versioning.
If you would like some more information on the SemVer rules you can check out their website. :slight_smile:

Again, sorry for the bad news, hopefully that workaround is suitable for your needs. Feel free to let me know if I can explain this better or if you have any further questions.

Best regards,

Hi Daniel,

That is ok, thank you for your reply.

We have solved it with a different approach:

  •      For Automated Releases:

o Build Server creates a full build number e.g. 1.0.17003.1

o This is pushed automatically to Octopus

o Octopus is set to auto create release, when packages come in on the built-in pipeline

o Project is set to “Use the version number from an included package”

  •      For Manual Releases

o We type a postfix manually, e.g. 1.0.17003.1-v1

o I.e. when next version comes in from build server e.g. 1.0.17003.2 everything is fine.

Feel free to close the ticket.

Kind Regards,

Thomas :slight_smile:

Hi Thomas,

Thanks for getting back! I’m glad to hear that you solved this! It looks like you are using a good solution here!

Please don’t hesitate to get back in touch in the future if you run into any issues.

Best regards,