From 43e64177dcfc9c4923e9407ffb09162c2d7ead05 Mon Sep 17 00:00:00 2001 From: Tin Nguyen Date: Sat, 30 Jul 2022 17:42:28 +0700 Subject: [PATCH 1/3] Update npm-publish.yml --- .github/workflows/npm-publish.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 182c48c..e7457ee 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -15,9 +15,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - - run: npm ci - - run: npm test - + publish-npm: needs: build runs-on: ubuntu-latest From c21b9398753087599789a32fcec14df4ae6e703f Mon Sep 17 00:00:00 2001 From: Tin Nguyen Date: Sat, 30 Jul 2022 17:47:12 +0700 Subject: [PATCH 2/3] Delete npm-publish.yml --- .github/workflows/npm-publish.yml | 32 ------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index e7457ee..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,32 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages - -name: NpmJS Publish Bot - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: yarn install - - run: npm run build - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} From d719fd180e17164a9f84905c929171b9cf20b8f2 Mon Sep 17 00:00:00 2001 From: Tin Nguyen Date: Sat, 30 Jul 2022 17:47:25 +0700 Subject: [PATCH 3/3] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..c8932e1 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,31 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: yarn install + - run: yarn build + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://registry.npmjs.org/ + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}