Skip to content

Commit 79aace8

Browse files
committed
chore: publish v6.0.1
1 parent 73a0c10 commit 79aace8

1 file changed

Lines changed: 8 additions & 48 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,15 @@ jobs:
1616
steps:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
19-
20-
- name: Set up Bun
21-
uses: oven-sh/setup-bun@v1
19+
20+
- name: Set up Node.js for GitHub Packages publish
21+
uses: actions/setup-node@v4
2222
with:
23-
bun-version: latest
24-
25-
- name: Install dependencies
26-
run: bun install --frozen-lockfile
27-
28-
- name: Build package
29-
run: bun run build
23+
node-version: '20'
24+
registry-url: 'https://npm.pkg.github.com'
3025

31-
- name: Configure Git
32-
run: |
33-
git config --global user.name 'github-actions[bot]'
34-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
35-
# Ensure we are on the correct branch for versioning and push
36-
git checkout main
37-
# Pull latest changes to avoid conflicts if any (less likely for simple push trigger)
38-
git pull origin main --ff-only
39-
40-
- name: Increment version, commit, and push
41-
run: |
42-
# Increment patch version in package.json
43-
# The -m flag sets the commit message for the version bump if npm were to create a tag/commit itself.
44-
# --no-git-tag-version prevents npm from creating a tag.
45-
npm version patch --no-git-tag-version -m "chore(release): Bump version to %s [skip ci]"
46-
NEW_VERSION=$(node -p "require('./package.json').version")
47-
echo "New version: $NEW_VERSION"
48-
49-
# Commit package.json and bun.lockb
50-
git add package.json bun.lockb
51-
# Check if there are changes to commit (npm version patch should always change package.json)
52-
if ! git diff --staged --quiet; then
53-
git commit -m "chore(release): Bump version to $NEW_VERSION [skip ci]"
54-
git push origin main
55-
else
56-
echo "No changes to commit for version bump. This is unexpected after 'npm version patch'."
57-
# Optionally, fail the workflow if this happens, as it's an anomaly
58-
# exit 1
59-
fi
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Install dependencies and build
27+
run: npm install && npm run build
6228

6329
- name: Verify package scope
6430
run: |
@@ -70,13 +36,7 @@ jobs:
7036
exit 1
7137
fi
7238
echo "Package name '$PACKAGE_NAME' is correctly scoped."
73-
74-
- name: Set up Node.js for GitHub Packages publish
75-
uses: actions/setup-node@v4
76-
with:
77-
node-version: '20'
78-
registry-url: 'https://npm.pkg.github.com'
79-
39+
8040
- name: Publish to GitHub Packages
8141
run: npm publish
8242
env:

0 commit comments

Comments
 (0)