Skip to content

Commit 7e753f5

Browse files
authored
docs(changeset): release name (#61)
1 parent 379c2ca commit 7e753f5

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

.changeset/metal-mugs-divide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@kurrier/repo": patch
3+
---
4+
5+
release name

.github/workflows/release-images.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,43 @@ jobs:
8787
permissions:
8888
contents: write
8989
steps:
90+
- name: Read version from repo-version package
91+
id: v
92+
run: |
93+
FILE=packages/repo-version/package.json
94+
if [ ! -f "$FILE" ]; then
95+
echo "::error::$FILE not found"; exit 1
96+
fi
97+
VER=$(jq -r .version "$FILE")
98+
if [ -z "$VER" ] || [ "$VER" = "null" ]; then
99+
echo "::error::version missing in $FILE"; exit 1
100+
fi
101+
echo "ver=$VER" >> "$GITHUB_OUTPUT"
102+
echo "Resolved version: $VER"
103+
104+
- name:
105+
Guard: version must be present
106+
run: |
107+
if [ -z "${{ steps.v.outputs.ver }}" ]; then
108+
echo "::error::Empty version output"; exit 1
109+
fi
110+
111+
# (Optional) Create the tag using the SAME id
112+
- name: Create tag if missing and push
113+
env:
114+
VER: ${{ steps.v.outputs.ver }}
115+
run: |
116+
set -euo pipefail
117+
TAG="v${VER}"
118+
git fetch --tags --force
119+
if git ls-remote --tags origin | grep -q "refs/tags/$TAG$"; then
120+
echo "Tag $TAG already exists on origin; nothing to do."
121+
exit 0
122+
fi
123+
git tag -a "$TAG" -m "Release $TAG"
124+
git push origin "$TAG"
125+
126+
# ✅ This will now evaluate to e.g. "v0.0.15" instead of plain "v"
90127
- name: Create GitHub Release
91128
uses: softprops/action-gh-release@v2
92129
with:
@@ -96,6 +133,15 @@ jobs:
96133
env:
97134
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98135

136+
# - name: Create GitHub Release
137+
# uses: softprops/action-gh-release@v2
138+
# with:
139+
# tag_name: ${{ github.ref_name }}
140+
# name: ${{ github.ref_name }}
141+
# generate_release_notes: true
142+
# env:
143+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+
99145

100146
#name: release-images
101147
#on:

0 commit comments

Comments
 (0)