Skip to content

Commit d2f9ee2

Browse files
committed
Add npm_pkg.yaml
1 parent 7b46a4f commit d2f9ee2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/npm_pkg.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# https://docs.github.com/ja/actions/guides/publishing-nodejs-packages
2+
name: Node.js Package
3+
on:
4+
release:
5+
types: [created]
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
environment: npm_pkg
10+
steps:
11+
- uses: actions/checkout@v2
12+
# npm に公開するように .npmrc ファイルを設定する
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: '14.x'
16+
registry-url: 'https://registry.npmjs.org'
17+
- run: npm install
18+
# prepublishOnly を外してここで明示的に buiuld の方が良いか
19+
- run: npm publish
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)