You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UID2-7340: verify release tag exists; harden previous-tag resolution
Add a guard on the pre-release path that fails if the v<version> tag does
not already exist, instead of letting softprops auto-create it at the
checked-out commit and durably mis-tag the release. Every current consumer
pushes the tag via commit_pr_and_merge before publishing; this protects
future callers that don't.
Harden Resolve previous published tag: set -euo pipefail so a gh failure
(auth/5xx/rate-limit) aborts the step rather than silently falling back to
mikepenz over the wrong changelog window — a genuine empty result (first
cut) still falls back as intended. Note that .[0] is newest-by-creation,
not highest semver.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,10 @@ All shared publish workflows generate release notes via the `actions/shared_crea
11
11
- The native format hardcodes `* TITLE by @AUTHOR in #NUMBER`. Authors are noise to the public consumers of these releases; mikepenz's `pr_template` lets us emit `- TITLE - ( PR: #NUMBER )` instead.
12
12
- The composite embeds a per-platform install snippet (`docker pull`, `pip install`, `dotnet add package`, Maven `<dependency>`) above the changelog.
13
13
14
-
`shared_create_releases` supports `publish_platform` values `Docker`, `Maven`, `PyPI`, `NuGet`, `iOS`. It runs four steps internally: Resolve previous published tag (gh) → Build Changelog (mikepenz) → Delete Draft Releases → Create Release (softprops). The `prerelease` input (default `'false'`) controls the release type:
14
+
`shared_create_releases` supports `publish_platform` values `Docker`, `Maven`, `PyPI`, `NuGet`, `iOS`. Internally it builds the changelog (mikepenz), deletes stale drafts, and creates the release (softprops); on the pre-release path it additionally resolves the previous published tag (gh) and verifies the `v<version>` tag exists before publishing. The `prerelease` input (default `'false'`) controls the release type:
15
15
16
16
- omitted / `prerelease: 'false'` (default) — creates a **draft** release (the original behaviour, still requires a manual "Publish" click). The Maven/PyPI/NuGet/iOS (registry/SDK) workflows keep this default for now.
17
-
-`prerelease: 'true'` — publishes a **pre-release** immediately (durable + fetchable by tag, without claiming GA). The shared docker workflows set this for deployed-service builds. `Latest` is never set automatically — it stays a deliberate manual promotion.
17
+
-`prerelease: 'true'` — publishes a **pre-release** immediately (durable + fetchable by tag, without claiming GA). The shared docker workflows set this for deployed-service builds. `Latest` is never set automatically — it stays a deliberate manual promotion. The `v<version>` tag must already exist (pushed earlier by `commit_pr_and_merge`); the action verifies this and fails rather than letting softprops auto-create the tag at the wrong commit.
18
18
19
19
When `is_release` is `false` (Snapshot/pre-release build) the action is a no-op, so callers can invoke it unconditionally.
if gh api "repos/${{ github.repository }}/git/ref/tags/$tag" >/dev/null 2>&1; then
252
+
echo "Verified release tag $tag exists."
253
+
else
254
+
echo "::error::Release tag $tag does not exist (or could not be read). A pre-release must attach to a tag pushed before this step by commit_pr_and_merge. Refusing to publish and auto-create the tag at the wrong commit."
0 commit comments