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
echo "Added semantic-release note to v1.0.0-beta.1 (local only for dry run)."
97
97
98
-
# One-time migration: v1.0.0-beta.1 existed before semantic-release was configured
99
-
#with channel notes. Semantic-release prepares all other versions itself (tags + notes).
100
-
#This step only fixes that one tag so semantic-release can see it as "last release".
101
-
- name: Migrate v1.0.0-beta.1 tag for semantic-release (one-time)
98
+
# One-time fix: v1.0.0-beta.1 existed before semantic-release (manual publish).
99
+
#It has no channel note, so semantic-release ignores it and tries to create the tag again → "tag already exists".
100
+
#Fix: delete the broken tag so semantic-release can create it properly (with note). After this run, remove this step.
101
+
- name: Remove broken v1.0.0-beta.1 tag so semantic-release can create it (one-time)
102
102
if: github.event.inputs.dry_run != 'true'
103
103
run: |
104
104
set -e
105
-
echo "=== Migrating v1.0.0-beta.1 so semantic-release sees it as last release ==="
106
-
# semantic-release treats a tag as "last release" only if: 1) tag is in "git tag --merged main", 2) tag has note {"channels":["beta"]} in ref semantic-release-<tag>
107
-
if ! git rev-parse --verify "v1.0.0-beta.1" >/dev/null 2>&1; then
108
-
echo "Tag v1.0.0-beta.1 does not exist; creating at HEAD."
109
-
git tag -a "v1.0.0-beta.1" HEAD -m "chore: initial beta release"
echo "Tags merged into main: $(git tag --merged main | tr '\n' ' ')"
128
-
git notes --ref semantic-release-v1.0.0-beta.1 show v1.0.0-beta.1 2>/dev/null && echo "Note present for v1.0.0-beta.1" || echo "WARN: no note for v1.0.0-beta.1"
112
+
echo "Tag v1.0.0-beta.1 does not exist; semantic-release will create it."
129
113
fi
130
-
echo "=== Done; semantic-release will see v1.0.0-beta.1 as last release ==="
0 commit comments