Skip to content

Commit 15567cf

Browse files
committed
fix: release workflow — use --no-git-tag, proper git push, fix release body generation
1 parent d18ebbd commit 15567cf

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: changesets/action@v1
3939
with:
4040
version: bun run version
41-
publish: bun run release
41+
publish: bun run release --no-git-tag
4242
commit: "chore: version packages"
4343
title: "chore: version packages"
4444
env:
@@ -54,17 +54,27 @@ jobs:
5454
VERSION=$(echo "$PUBLISHED" | jq -r '.[0].version')
5555
TAG="v${VERSION}"
5656
57-
cat > /tmp/release-body.md <<- EOF
58-
## Published Packages
57+
# Build release body
58+
{
59+
echo "## Published Packages"
60+
echo ""
61+
for row in $(echo "$PUBLISHED" | jq -r '.[] | @base64'); do
62+
PKG_NAME=$(echo "$row" | base64 -d | jq -r '.name')
63+
VER=$(echo "$row" | base64 -d | jq -r '.version')
64+
echo "- \`\`${PKG_NAME}@${VER}\`\` — [npm](https://www.npmjs.com/package/${PKG_NAME}/v/${VER})"
65+
done
66+
echo ""
67+
echo "## Install"
68+
echo ""
69+
echo '```sh'
70+
echo "bun add @mohanscodex/spectra-ai@${VERSION}"
71+
echo '```'
72+
} > /tmp/release-body.md
5973
60-
$(echo "$PUBLISHED" | jq -r '.[] | "- \`\(.name)@\(.version)\` — [npm](https://www.npmjs.com/package/\(.name)/v/\(.version))"')
61-
62-
## Install
63-
64-
\`\`\`sh
65-
bun add @mohanscodex/spectra-ai@${VERSION}
66-
\`\`\`
67-
EOF
74+
# Create and push unified tag, then create GitHub Release
75+
git tag "$TAG"
76+
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
77+
git push origin "$TAG"
6878
6979
gh release create "$TAG" \
7080
--title "Spectra $TAG" \

0 commit comments

Comments
 (0)