Skip to content

Commit 4e3d2d0

Browse files
committed
🚑 (package.json) fix repo url
1 parent 8f6d77b commit 4e3d2d0

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

.github/workflows/npm.yml

+15-12
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,22 @@ on:
66
- master
77

88
jobs:
9-
publish:
9+
build:
1010
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v2
11+
permissions:
12+
contents: read
13+
id-token: write
1414

15-
- name: Install dependencies
16-
run: npm install
15+
steps:
16+
- uses: actions/checkout@v4
17+
# Setup .npmrc file to publish to npm
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '20.x'
21+
registry-url: 'https://registry.npmjs.org'
22+
always-auth: true
23+
scope: '@buzut'
1724

18-
- name: Login to npm
25+
- run: npm publish --provenance --access public
1926
env:
20-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
21-
run: npm login --auth-type=token
22-
23-
- name: Publish to npm
24-
run: npm publish
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"repository": {
1010
"type": "git",
11-
"url": "https://github.com/Buzut/humantime.git"
11+
"url": "git+https://github.com/Buzut/humantime.git"
1212
},
1313
"keywords": [
1414
"moment",
@@ -27,5 +27,8 @@
2727
},
2828
"devDependencies": {
2929
"prettier": "^3.3.3"
30+
},
31+
"publishConfig": {
32+
"access": "public"
3033
}
3134
}

0 commit comments

Comments
 (0)