Skip to content

Commit 282ef9c

Browse files
authored
Merge pull request #12 from Monnify/dev
Fix: skip-github-release silently skipped tag creation too
2 parents 97bb13f + 427c440 commit 282ef9c

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ name: release-please
33
# Maintains a standing "release PR" that accumulates Conventional Commits since the last
44
# release and computes the next semver bump from them (feat: -> minor, fix: -> patch,
55
# "BREAKING CHANGE:" footer -> major). Merging that PR creates and pushes a vX.Y.Z tag,
6-
# which is what actually triggers release.yml's build/test/pack/publish pipeline - this
7-
# workflow only ever decides the version number and creates the tag, nothing here touches
8-
# NuGet or creates a GitHub Release (skip-github-release in release-please-config.json,
9-
# since release.yml's own publish job already creates the Release after a successful
10-
# publish - having both would create two Releases for the same tag).
6+
# which is what actually triggers release.yml's build/test/pack/publish pipeline.
7+
#
8+
# "draft": true in release-please-config.json makes this also create a draft (not
9+
# publicly visible) GitHub Release alongside the tag - NOT "skip-github-release", which
10+
# turned out to skip the tag too (see https://github.com/googleapis/release-please-action/issues/1034),
11+
# silently breaking this entire chain. release.yml's own publish job un-drafts that
12+
# release (draft: false on its softprops/action-gh-release step) only after a successful,
13+
# manually-approved NuGet push - so nothing is publicly visible as "released" until it
14+
# actually is.
1115
on:
1216
push:
1317
branches: [main]

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,14 @@ jobs:
8383
- name: Push to NuGet.org
8484
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
8585

86-
- name: Create GitHub Release
86+
# release-please creates this release as a draft (see release-please.yml) when its
87+
# Release PR merges, so the tag exists without anything publicly visible yet. This step
88+
# finds that same release by tag and un-drafts it - only after a successful, approved
89+
# NuGet push - rather than creating a second one.
90+
- name: Publish GitHub Release
8791
uses: softprops/action-gh-release@v3
8892
with:
8993
name: v${{ needs.build-test-pack.outputs.version }}
9094
files: ./artifacts/*.nupkg
9195
generate_release_notes: true
96+
draft: false

release-please-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3-
"skip-github-release": true,
3+
"draft": true,
44
"packages": {
55
".": {
66
"release-type": "simple",

0 commit comments

Comments
 (0)