Skip to content

Commit e1de440

Browse files
committed
fix: publish error to npm
1 parent 7f857be commit e1de440

File tree

3 files changed

+13
-68
lines changed

3 files changed

+13
-68
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -9,77 +9,23 @@ permissions:
99
contents: write
1010
id-token: write
1111

12+
# ...
1213
jobs:
13-
release:
14-
name: Build and Publish to npm
14+
publish:
1515
runs-on: ubuntu-latest
16-
environment: npm-publish
16+
permissions:
17+
contents: read
18+
id-token: write # for OIDC
1719

1820
steps:
1921
- name: Checkout code
2022
uses: actions/checkout@v4
2123

22-
- name: Setup Bun
23-
uses: oven-sh/setup-bun@v2
24+
- name: Setup Node
25+
uses: actions/setup-node@v5
2426
with:
25-
bun-version: latest
26-
27-
- name: Setup Node.js
28-
uses: actions/setup-node@v4
29-
with:
30-
node-version: '20'
31-
registry-url: 'https://registry.npmjs.org'
32-
token: ${{ secrets.NPM_TOKEN }}
33-
34-
- name: Install dependencies
35-
run: bun install --frozen-lockfile
36-
37-
- name: Run linter
38-
run: bun run lint
39-
40-
- name: Check formatting
41-
run: bun run format:check
42-
43-
- name: Build project
44-
run: bun run build
45-
46-
- name: Extract version and commit info
47-
id: get_info
48-
run: |
49-
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
50-
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
51-
echo "COMMIT_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
52-
echo "COMMIT_FULL=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
53-
54-
- name: Create release archive
55-
run: |
56-
cd dist
57-
zip broom-${{ steps.get_info.outputs.VERSION }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip index.js
58-
cd ..
59-
27+
node-version: "24.x"
28+
registry-url: "https://registry.npmjs.org"
29+
# ...
6030
- name: Publish to npm
6131
run: npm publish --provenance --access public
62-
63-
- name: Create GitHub Release
64-
uses: softprops/action-gh-release@v2
65-
with:
66-
files: |
67-
dist/broom-${{ steps.get_info.outputs.VERSION }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip
68-
generate_release_notes: true
69-
draft: false
70-
prerelease: false
71-
body: |
72-
## Installation
73-
74-
```bash
75-
npm install -g @tukuyomil032/broom@${{ steps.get_info.outputs.VERSION }}
76-
```
77-
78-
## Download
79-
80-
Download the pre-built binary:
81-
- `broom-${{ steps.get_info.outputs.VERSION }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip`
82-
83-
**Commit**: `${{ steps.get_info.outputs.COMMIT_FULL }}`
84-
env:
85-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tukuyomil032/broom",
33
"private": false,
4-
"version": "1.0.4",
4+
"version": "1.0.5",
55
"description": "🧹 macOS Disk Cleanup CLI - Clean up caches, logs, trash, browser data, dev artifacts, and more",
66
"type": "module",
77
"main": "./dist/index.js",
@@ -87,6 +87,5 @@
8787
"eslint --fix",
8888
"prettier --write"
8989
]
90-
},
91-
"packageManager": "bun@1.3.6"
90+
}
9291
}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
import { enableDebug, debug } from './utils/debug.js';
3434
import { getGlobalOptionsTable } from './utils/help.js';
3535

36-
const VERSION = '1.0.3';
36+
const VERSION = '1.0.5';
3737

3838
// ASCII art logo
3939
const logo = chalk.cyan(`

0 commit comments

Comments
 (0)