Skip to content

Commit 1c53564

Browse files
authored
Unified Build Infrastructure across Family of projects (#18)
1 parent de31457 commit 1c53564

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

.github/workflows/release-build.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,13 @@ jobs:
6767
directory: .\BuildOutput\docs
6868
branch: gh-pages
6969

70-
# no automatic publication of NuGet packages, too much room for mistakes as publication to NuGet
71-
# cannot be undone. The packages must be manually published AFTER a successful GH release process
72-
# as a GH release ca be undone!
73-
# - name: Publish packages to NuGet.org
74-
# run: |
75-
# if( [string]::IsNullOrWhiteSpace('${{secrets.NUGETPUSH_ACCESS_TOKEN}}'))
76-
# {
77-
# throw "'NUGETPUSH_ACCESS_TOKEN' does not exist, is empty or all whitespace!"
78-
# }
79-
# dotnet nuget push .\BuildOutput\NuGet\*.nupkg --api-key '${{secrets.NUGETPUSH_ACCESS_TOKEN}}' --source 'https://api.nuget.org/v3/index.json' --skip-duplicate
70+
- name: Publish packages to NuGet.org
71+
run: |
72+
if( [string]::IsNullOrWhiteSpace('${{secrets.NUGETPUSH_ACCESS_TOKEN}}'))
73+
{
74+
throw "'NUGETPUSH_ACCESS_TOKEN' does not exist, is empty or all whitespace!"
75+
}
76+
dotnet nuget push .\BuildOutput\NuGet\*.nupkg --api-key '${{secrets.NUGETPUSH_ACCESS_TOKEN}}' --source 'https://api.nuget.org/v3/index.json' --skip-duplicate
8077
8178
- name: Create Release
8279
if: (!cancelled())

OneFlow/Publish-Release.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ if($PSCmdlet.ShouldProcess("$forkRemoteName $mergeBackBranchName", "git push"))
7777
Invoke-External git push $forkRemoteName $mergeBackBranchName
7878
}
7979

80-
if($PSCmdlet.ShouldProcess("$tagName", "Fast-Forward main (Switch, merge -ff-only, push)"))
80+
if($PSCmdlet.ShouldProcess("$tagName", "Reset main to point to release tag"))
8181
{
82-
Write-Information 'Fast-forwarding main to tagged release'
82+
Write-Information 'Updating main to point to tagged release'
8383
Invoke-External git switch '-C' $mainBranchName $officialMainBranch
84-
Invoke-External git merge --ff-only $tagName
85-
Invoke-External git push $officialRemoteName $mainBranchName
84+
Invoke-External git reset --hard $tagName
85+
Invoke-External git push --force $officialRemoteName $mainBranchName
8686
}

0 commit comments

Comments
 (0)