Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Commit 3f78fe3

Browse files
committed
Change script
1 parent 3f64912 commit 3f78fe3

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
1-
name: Publish NPM Package
1+
name: Publish Package to npmjs
22

33
on:
44
push:
5-
# branches:
6-
# - main
5+
# types: [published]
76

87
jobs:
9-
publish:
8+
build:
109
runs-on: ubuntu-latest
11-
1210
steps:
13-
- name: Checkout Repository
14-
uses: actions/checkout@v2
15-
16-
- name: Set up Node.js
17-
uses: actions/setup-node@v2
11+
- uses: actions/checkout@v4
12+
# Setup .npmrc file to publish to npm
13+
- uses: actions/setup-node@v3
1814
with:
19-
node-version: 20.5.1
20-
21-
- name: Install Dependencies
22-
run: npm install
23-
24-
# - name: Build Package
25-
# run: npm run build
26-
27-
- name: Publish to NPM
28-
run: |
29-
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
30-
npm publish --access public
15+
node-version: '20.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
- run: npm ci
18+
- run: npm publish --access public
3119
env:
3220
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)