Skip to content

Commit 7503718

Browse files
committed
chore: wip
1 parent 1687ead commit 7503718

File tree

2 files changed

+7
-41
lines changed

2 files changed

+7
-41
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
npm:
10+
name: npm
1011
runs-on: ubuntu-latest
1112

1213
steps:
@@ -30,9 +31,7 @@ jobs:
3031
node-modules-
3132
3233
- name: Install Dependencies
33-
run: |
34-
bun install
35-
bun add -g logsmith
34+
run: bun install
3635

3736
- name: Publish to npm
3837
run: ./scripts/publish.sh
@@ -55,39 +54,3 @@ jobs:
5554
packages/stx/bin/stx-darwin-arm64.zip
5655
env:
5756
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
59-
- name: Extract Version
60-
id: version
61-
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
62-
63-
- name: Generate Release Changelog
64-
run: |
65-
# Generate changelog for this release only
66-
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "")
67-
if [ -n "$PREVIOUS_TAG" ]; then
68-
logsmith --from "$PREVIOUS_TAG" --to "${{ steps.version.outputs.VERSION }}" \
69-
--theme github --format markdown --output RELEASE_NOTES.md
70-
else
71-
logsmith --to "${{ steps.version.outputs.VERSION }}" \
72-
--theme github --format markdown --output RELEASE_NOTES.md
73-
fi
74-
75-
- name: Update Full Changelog
76-
run: |
77-
logsmith --theme github --output CHANGELOG.md
78-
git config --local user.email "action@github.com"
79-
git config --local user.name "GitHub Action"
80-
git add CHANGELOG.md
81-
git commit -m "docs: update changelog for ${{ steps.version.outputs.VERSION }}" || exit 0
82-
git push origin HEAD:main
83-
84-
- name: Create GitHub Release
85-
uses: actions/create-release@v1
86-
env:
87-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88-
with:
89-
tag_name: ${{ steps.version.outputs.VERSION }}
90-
release_name: Release ${{ steps.version.outputs.VERSION }}
91-
body_path: RELEASE_NOTES.md
92-
draft: false
93-
prerelease: false

scripts/publish.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,15 @@ if [ -d "packages/collections" ]; then
145145
fi
146146

147147
echo "Publishing $package_name..."
148-
# Publish from the root directory to maintain authentication
149-
if bun publish --cwd "$collection_dir" --access public; then
148+
# Change to the collection directory to publish
149+
cd "$collection_dir"
150+
if bun publish --access public; then
150151
echo "✅ Published $package_name"
151152
published_count=$((published_count + 1))
153+
cd - > /dev/null
152154
else
153155
echo "❌ Failed to publish $package_name"
156+
cd - > /dev/null
154157
# Restore original package.json on failure if backup exists
155158
if [ -f "$package_json_backup" ]; then
156159
mv "$package_json_backup" "$package_json"

0 commit comments

Comments
 (0)