Skip to content

Commit 793d8e0

Browse files
authored
Try to publish to NPM registry first (#8)
1 parent 393e9b3 commit 793d8e0

File tree

3 files changed

+33
-41
lines changed

3 files changed

+33
-41
lines changed

.github/workflows/publish-npm.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to NPM Registry
2+
3+
on:
4+
release:
5+
types: [released]
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: '16.x'
17+
registry-url: 'https://registry.npmjs.org'
18+
scope: '@rickyc0626'
19+
20+
- name: Setup yarn
21+
run: npm install -g yarn
22+
23+
- name: Install dependencies
24+
run: yarn install --frozen-lockfile
25+
26+
- name: Run tests
27+
run: yarn test
28+
29+
- name: Publish package to registries
30+
run: yarn publish
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
"license": "MIT",
99
"scripts": {
1010
"test": "jest",
11-
"test:watch": "jest --watch",
12-
"publish-npm": "npm publish --access public --ignore-scripts --@rickyc0626:registry='https://registry.npmjs.org'",
13-
"postpublish": "npm run publish-npm"
11+
"test:watch": "jest --watch"
1412
},
1513
"dependencies": {
1614
"sharp": "^0.30.4"

0 commit comments

Comments
 (0)