From 654b83e0f37273cc1b07a11139d87d9139fe94c2 Mon Sep 17 00:00:00 2001 From: Zach Guo Date: Tue, 20 Aug 2019 15:00:38 -0700 Subject: [PATCH 1/2] fix absent node_modules for npm publish --- ci/npm-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index 3ae89d4..d8da525 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -28,6 +28,7 @@ jobs: with: node-version: 12 registry-url: https://registry.npmjs.org/ + - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} @@ -42,6 +43,7 @@ jobs: node-version: 12 registry-url: https://npm.pkg.github.com/ scope: '@your-github-username' + - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 7f515b734a9427a44a721519b7eb4f99ade8922f Mon Sep 17 00:00:00 2001 From: Zach Guo Date: Tue, 17 Sep 2019 12:31:43 -0700 Subject: [PATCH 2/2] only trigger npm publish on release creation event --- ci/npm-publish.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ci/npm-publish.yml b/ci/npm-publish.yml index d8da525..ed81431 100644 --- a/ci/npm-publish.yml +++ b/ci/npm-publish.yml @@ -1,12 +1,8 @@ name: Node.js Package on: - pull_request: - branches: - - master - push: - branches: - - master + release: + types: [created] jobs: build: