diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 0050c15..2b6a2f0 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -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] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c894ccc..f58b036 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/release-please-config.json b/release-please-config.json index 8e5d8f0..9053307 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -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",