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
14 changes: 9 additions & 5 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ name: release-please
# Maintains a standing "release PR" that accumulates Conventional Commits since the last
# release and computes the next semver bump from them (feat: -> minor, fix: -> patch,
# "BREAKING CHANGE:" footer -> major). Merging that PR creates and pushes a vX.Y.Z tag,
# which is what actually triggers release.yml's build/test/pack/publish pipeline - this
# workflow only ever decides the version number and creates the tag, nothing here touches
# NuGet or creates a GitHub Release (skip-github-release in release-please-config.json,
# since release.yml's own publish job already creates the Release after a successful
# publish - having both would create two Releases for the same tag).
# which is what actually triggers release.yml's build/test/pack/publish pipeline.
#
# "draft": true in release-please-config.json makes this also create a draft (not
# publicly visible) GitHub Release alongside the tag - NOT "skip-github-release", which
# turned out to skip the tag too (see https://github.com/googleapis/release-please-action/issues/1034),
# silently breaking this entire chain. release.yml's own publish job un-drafts that
# release (draft: false on its softprops/action-gh-release step) only after a successful,
# manually-approved NuGet push - so nothing is publicly visible as "released" until it
# actually is.
on:
push:
branches: [main]
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,14 @@ jobs:
- name: Push to NuGet.org
run: dotnet nuget push "./artifacts/*.nupkg" --api-key "${{ steps.nuget_login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

- name: Create GitHub Release
# release-please creates this release as a draft (see release-please.yml) when its
# Release PR merges, so the tag exists without anything publicly visible yet. This step
# finds that same release by tag and un-drafts it - only after a successful, approved
# NuGet push - rather than creating a second one.
- name: Publish GitHub Release
uses: softprops/action-gh-release@v3
with:
name: v${{ needs.build-test-pack.outputs.version }}
files: ./artifacts/*.nupkg
generate_release_notes: true
draft: false
2 changes: 1 addition & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"skip-github-release": true,
"draft": true,
"packages": {
".": {
"release-type": "simple",
Expand Down
Loading