From 6f8053bbacdc43b501e78aa27797bbeffbf2a24b Mon Sep 17 00:00:00 2001 From: Bryan Jonker <65776851+bryanjonker-illinois@users.noreply.github.com> Date: Wed, 21 Aug 2024 09:47:17 -0500 Subject: [PATCH 1/3] Create publish_npm.yml --- .github/workflows/publish_npm.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/publish_npm.yml diff --git a/.github/workflows/publish_npm.yml b/.github/workflows/publish_npm.yml new file mode 100644 index 0000000..2c4707e --- /dev/null +++ b/.github/workflows/publish_npm.yml @@ -0,0 +1,21 @@ +name: publish_npm +on: + workflow_dispatch: + push: + tags: [ '**' ] + pull_request: + tags: [ '**' ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: 'Checkout GitHub Action' + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '22.x' + registry-url: 'https://registry.npmjs.org' + - name: Install to npm + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.TOOLKIT_NPM_SECRET}} From 9a1f9091906ee932e27aa29b39f26fc3b861efce Mon Sep 17 00:00:00 2001 From: Bryan Jonker <65776851+bryanjonker-illinois@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:32:27 -0500 Subject: [PATCH 2/3] Update publish_npm.yml Remove pull_request --- .github/workflows/publish_npm.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish_npm.yml b/.github/workflows/publish_npm.yml index 2c4707e..99e0d43 100644 --- a/.github/workflows/publish_npm.yml +++ b/.github/workflows/publish_npm.yml @@ -3,8 +3,6 @@ on: workflow_dispatch: push: tags: [ '**' ] - pull_request: - tags: [ '**' ] jobs: build: runs-on: ubuntu-latest From de0f9917f1a600c5f39793ab607a323a2ecb5458 Mon Sep 17 00:00:00 2001 From: Bryan Jonker <65776851+bryanjonker-illinois@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:58:47 -0500 Subject: [PATCH 3/3] Update publish_npm.yml Adding build script to create /dist files --- .github/workflows/publish_npm.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish_npm.yml b/.github/workflows/publish_npm.yml index 99e0d43..529d9af 100644 --- a/.github/workflows/publish_npm.yml +++ b/.github/workflows/publish_npm.yml @@ -13,6 +13,9 @@ jobs: with: node-version: '22.x' registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm rebuild + - run: npm run-script build - name: Install to npm run: npm publish --access public env: