From 0f0017b4f8af9b5bdbf6195a827ebcbb7f756320 Mon Sep 17 00:00:00 2001 From: notwillk <44582272+notwillk@users.noreply.github.com> Date: Mon, 20 Mar 2023 10:36:21 -0700 Subject: [PATCH 1/3] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 20 ++++++++++++++++++++ 1 file changed, 20 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..1d14271 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,20 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + # Defaults to the user or organization that owns the workflow file + scope: '@octocat' + - run: yarn + - run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 57a11662336a4847c33461e558b5ae13fc0854fa Mon Sep 17 00:00:00 2001 From: notwillk <44582272+notwillk@users.noreply.github.com> Date: Mon, 20 Mar 2023 10:41:40 -0700 Subject: [PATCH 2/3] Update .github/workflows/npm-publish.yml --- .github/workflows/npm-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1d14271..5fbf389 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -15,6 +15,8 @@ jobs: # Defaults to the user or organization that owns the workflow file scope: '@octocat' - run: yarn + - yarn build:clean + - yarn build - run: yarn publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 2566abd15c065979b17ebc590fbd5940aafe479b Mon Sep 17 00:00:00 2001 From: notwillk <44582272+notwillk@users.noreply.github.com> Date: Mon, 20 Mar 2023 10:42:08 -0700 Subject: [PATCH 3/3] Update .github/workflows/npm-publish.yml --- .github/workflows/npm-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 5fbf389..9a1b8da 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -15,8 +15,8 @@ jobs: # Defaults to the user or organization that owns the workflow file scope: '@octocat' - run: yarn - - yarn build:clean - - yarn build + - run: yarn build:clean + - run: yarn build - run: yarn publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}