@@ -35,13 +35,15 @@ jobs:
35
35
- name : Build setup
36
36
id : build-setup
37
37
run : >
38
- dotnet tool update Sundew.Packaging.Tool -g --version 8.8 .*
38
+ dotnet tool update Sundew.Packaging.Tool -g --version 8.10 .*
39
39
40
40
dotnet tool update CommandlineBatcher -g --version 8.6.*
41
41
42
42
git rev-parse --short=10 HEAD | cb -c ">> $GITHUB_OUTPUT|git-hash={0}{NL}" --batches-stdin
43
43
44
44
cb match -p "(?<Input>^(?!(refs/pull.*|refs/heads/$)).+) => git-branch-name={Input}" -i "refs/heads/${{ github.base_ref }}" "${{ github.ref }}" -of $GITHUB_OUTPUT
45
+
46
+ git log -1 --pretty=%B > git_commit_message.txt
45
47
- name : Stage Build
46
48
id : stage-build
47
49
run : >
@@ -51,20 +53,20 @@ jobs:
51
53
--development "refs/heads/(?:develop.*|feature/(?<Postfix>.+)|bugfix/(?<Postfix>.+)) => ${{ secrets.SPP_DEVELOPMENT_API_KEY }}@${{ env.dev-source }} {${{ env.dev-source-latest-version }}}|${{ secrets.SPP_DEVELOPMENT_API_KEY }}@${{ env.dev-symbols-source }}||Configuration=Debug|DevFeedSource= -s ${{ env.dev-source-latest-version }}"
52
54
--no-stage "Configuration=Release"
53
55
--stage "${{ github.ref }}"
56
+ --build-promotion-input "< git_commit_message.txt"
57
+ --build-promotion-regex "=>\s*release"
54
58
--prerelease-format "u{DateTime}-{Stage}-{Postfix}"
55
59
--metadata ${{ steps.build-setup.outputs.git-hash }}
56
60
--force-version '"${{ secrets.SPP_FORCE_VERSION_IF_SET }}"'
57
61
--versioning-mode automatic-latest-revision
58
62
--output-formats "Selected stage: {Stage}, {FullVersion}, {Configuration}" ">|stage={Stage}{NL}" ">|version={Version}{NL}" ">|buildConfiguration={Configuration}{NL}"
59
63
">|nuGetPackagesPath={WorkingDirectory}/NuGet{NL}" ">|dev-package-source-if-set={DevFeedSource}{NL}" ">|feedSource={FeedSource}{NL}"
60
64
">|pushSource={PushSource}{NL}" ">|apiKey={ApiKey}{NL}" ">|globalVersion={VersionMinor}.{VersionPatch}.{VersionRevision}{NL}" ">|globalVersionRelease={VersionRelease}{NL}" ">|symbolsPushSource={SymbolsPushSource}{NL}"
61
- ">|symbolsApiKey={SymbolsApiKey}{NL}"
65
+ ">|symbolsApiKey={SymbolsApiKey}{NL}" ">|buildPromotion={BuildPromotion}"
62
66
--output-file $GITHUB_OUTPUT
63
-
64
- cb match -p "^refs/tags/release[^/]*$ => isReleaseCommand=true" -i "${{ github.ref }}" -of $GITHUB_OUTPUT
65
67
- name : ' Remove release tag'
66
- if : ${{ steps.stage-build.outputs.stage == 'production' }}
67
- run : cb --if "${{ steps.stage-build.outputs.isReleaseCommand }} == true" -c " git| push --delete ${{ env.repository }} ${{ github.ref }}"
68
+ if : ${{ steps.stage-build.outputs.stage == 'production' && steps.stage-build.outputs.buildPromotion != 'promoted' }}
69
+ run : git push --delete ${{ env.repository }} ${{ github.ref }}
68
70
- name : Restore
69
71
run : dotnet restore ${{ env.solutionPath }} --verbosity normal -s ${{ env.source }}${{ steps.stage-build.outputs.dev-package-source-if-set }}
70
72
- name : Build
0 commit comments