diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index aa2f0cfec..f17bd9320 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -1,4 +1,6 @@ -trigger: none +trigger: +- main + pr: none pool: @@ -6,6 +8,21 @@ pool: demands: - ImageOverride -equals MMS2022TLS +variables: + + - name: VersionSuffix + # The `Build.Reason` env var gets populated with `IndividualCI` on an automatic run of the CI, + # such as when a commit is made to `main`. If the CI is manually run, it will get populated with + # "Manual". For more details on these `Build.X` vars, see: https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services + ${{ if eq(variables['Build.Reason'], 'IndividualCI') }}: + # The `Build.BuildNumber` env var is an automatically-generated "build ID" + # for any given ADO run. It is usually the date format yyddmm. where + # `yyddmm` is a date formatter, and is a daily counter in case of multiple + # builds on the same date. + value: 'ci.$(Build.BuildNumber)' + ${{ else }}: + value: '' + steps: # Start by restoring all the dependencies. This needs to be its own task # from what I can tell. We specifically only target DurableTask.AzureStorage diff --git a/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj b/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj index 7e281163d..be5b6e2bb 100644 --- a/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj +++ b/src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj @@ -22,16 +22,21 @@ 1 17 1 - $(MajorVersion).$(MinorVersion).$(PatchVersion) $(VersionPrefix).0 $(VersionPrefix).$(FileVersionRevision) $(MajorVersion).$(MinorVersion).0.0 - + + + + $(VersionPrefix) + + $(VersionPrefix)-$(VersionSuffix) + diff --git a/src/DurableTask.Core/DurableTask.Core.csproj b/src/DurableTask.Core/DurableTask.Core.csproj index 94483e90c..536dfc22b 100644 --- a/src/DurableTask.Core/DurableTask.Core.csproj +++ b/src/DurableTask.Core/DurableTask.Core.csproj @@ -19,16 +19,21 @@ 2 16 2 - $(MajorVersion).$(MinorVersion).$(PatchVersion) $(VersionPrefix).0 $(VersionPrefix).$(FileVersionRevision) $(MajorVersion).$(MinorVersion).0.0 - + + + + $(VersionPrefix) + + $(VersionPrefix)-$(VersionSuffix) +