Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,13 @@ jobs:
directory: .\BuildOutput\docs
branch: gh-pages

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

- name: Create Release
if: (!cancelled())
Expand Down
8 changes: 4 additions & 4 deletions OneFlow/Publish-Release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ if($PSCmdlet.ShouldProcess("$forkRemoteName $mergeBackBranchName", "git push"))
Invoke-External git push $forkRemoteName $mergeBackBranchName
}

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