Skip to content

Commit 10fef5c

Browse files
committed
Unified Build Infrastructure across Family of projects
1 parent 613c948 commit 10fef5c

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

.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
@@ -74,10 +74,10 @@ if($PSCmdlet.ShouldProcess("$forkRemoteName $mergeBackBranchName", "git push"))
7474
Invoke-External git push $forkRemoteName $mergeBackBranchName
7575
}
7676

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

0 commit comments

Comments
 (0)