From 804e767312daddce8325f01b79af2a4e80f5e532 Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Sat, 2 Apr 2022 09:35:54 -0400 Subject: [PATCH 1/3] ci: auto npm publish script --- .github/workflows/npm-publish.yml | 18 ++++++++++++++++++ 1 file changed, 18 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 00000000000..13aa529ab90 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,18 @@ +name: Publish to NPM +on: + # When a release is created on GitHub, publish to NPM + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 77d03463a3caf3afd8ffc37e7d8b78d4da13fb55 Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Sat, 13 Aug 2022 00:55:07 -0400 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Shinigami --- .github/workflows/npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 13aa529ab90..a8cf4c26387 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16.x' + node-version: 18 registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm publish From b4c47e2b088aa50ca03bde238a9d3d04c91132c5 Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Sat, 13 Aug 2022 00:59:03 -0400 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: pkuczynski Co-authored-by: Shinigami92 --- .github/workflows/npm-publish.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index a8cf4c26387..003bfd7f92d 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,8 +11,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm publish + - run: pnpm ci + - run: pnpm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}