Skip to content

Commit e2e8eb1

Browse files
committed
fix: release.yml
1 parent 01dc6d7 commit e2e8eb1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
release:
1414
name: Build and Publish to npm
1515
runs-on: ubuntu-latest
16+
environment: npm-publish
1617

1718
steps:
1819
- name: Checkout code
@@ -52,12 +53,12 @@ jobs:
5253
- name: Create release archive
5354
run: |
5455
cd dist
55-
zip broom-${{ steps.get_info.outputs.TAG }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip index.js
56+
zip broom-${{ steps.get_info.outputs.VERSION }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip index.js
5657
cd ..
5758
5859
- name: Update package.json version
5960
run: |
60-
npm version ${{ steps.get_info.outputs.VERSION }} --no-git-tag-version
61+
node -e "const fs=require('fs'); const p=JSON.parse(fs.readFileSync('package.json','utf8')); p.version='${{ steps.get_info.outputs.VERSION }}'; fs.writeFileSync('package.json', JSON.stringify(p,null,2)+'\n');"
6162
6263
- name: Publish to npm with provenance
6364
run: npm publish --provenance --access public
@@ -68,7 +69,7 @@ jobs:
6869
uses: softprops/action-gh-release@v2
6970
with:
7071
files: |
71-
dist/broom-${{ steps.get_info.outputs.TAG }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip
72+
dist/broom-${{ steps.get_info.outputs.VERSION }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip
7273
generate_release_notes: true
7374
draft: false
7475
prerelease: false
@@ -82,7 +83,7 @@ jobs:
8283
## Download
8384
8485
Download the pre-built binary:
85-
- `broom-${{ steps.get_info.outputs.TAG }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip`
86+
- `broom-${{ steps.get_info.outputs.VERSION }}-${{ steps.get_info.outputs.COMMIT_SHORT }}.zip`
8687
8788
**Commit**: `${{ steps.get_info.outputs.COMMIT_FULL }}`
8889
env:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tukuyomil032/broom",
33
"private": false,
4-
"version": "1.0.2",
4+
"version": "1.0.3",
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",

0 commit comments

Comments
 (0)