Skip to content

Commit af8449f

Browse files
committed
Add publish automation with provenance
1 parent dee2c26 commit af8449f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish Package to npmjs
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
id-token: write
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: '20.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
- run: npm ci
18+
- run: npm publish --provenance --access public
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
"files": [
4343
"dist"
4444
],
45+
"repository": {
46+
"type": "git",
47+
"url": "git+https://github.com/nandi95/vue-toastify.git"
48+
},
4549
"dependencies": {
4650
"vue": "^3.0.11"
4751
},

0 commit comments

Comments
 (0)