From bea561b2fe74fa9193b579ddd800a1a6c278ec5a Mon Sep 17 00:00:00 2001 From: Pat Sissons Date: Fri, 10 Jan 2025 13:34:09 -0800 Subject: [PATCH] updating github workflows for npm publish --- .github/actions/install-dependencies/action.yml | 6 ++++-- .github/workflows/pr.workflow.yml | 1 + .github/workflows/release.workflow.yml | 6 ++---- package.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index 3505866..66b650b 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -14,10 +14,12 @@ runs: with: path: "**/node_modules" key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} - - name: Install node modules + - name: Configure npmrc shell: bash run: | echo "//registry.npmjs.org/:_authToken=${{ inputs.npm-token }}" >> .npmrc echo "registry=https://registry.npmjs.org" >> .npmrc echo "always-auth=true" >> .npmrc - yarn install --frozen-lockfile + - name: Install node modules + shell: bash + run: yarn install --frozen-lockfile diff --git a/.github/workflows/pr.workflow.yml b/.github/workflows/pr.workflow.yml index 3d614bd..babba9e 100644 --- a/.github/workflows/pr.workflow.yml +++ b/.github/workflows/pr.workflow.yml @@ -16,4 +16,5 @@ jobs: uses: ./.github/actions/install-dependencies - run: npm test env: + TZ: "America/Los_Angeles" SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }} diff --git a/.github/workflows/release.workflow.yml b/.github/workflows/release.workflow.yml index b5254df..3b2e839 100644 --- a/.github/workflows/release.workflow.yml +++ b/.github/workflows/release.workflow.yml @@ -21,13 +21,11 @@ jobs: env: TZ: "America/Los_Angeles" SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }} - - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - - run: npm run build + # if publish is failing, the current token has likely expired and a new token needs to be created + # create a new granular token with read/write access to expire in 1 year at https://www.npmjs.com/settings/blvd-it/tokens/ - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index e801b0a..0ec891b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@boulevard/blvd-book-sdk", - "version": "2.0.6", + "version": "2.0.7", "description": "A JS client for the Boulevard API", "main": "lib/blvd.js", "typings": "lib/blvd.js",