From 6b7ef778a7879b52266d8c25db66a4c52fa98cce Mon Sep 17 00:00:00 2001 From: Brian Cooper Date: Mon, 4 Dec 2023 16:09:39 -0500 Subject: [PATCH] proof of fix --- .github/workflows/components-test-build-deploy.yaml | 13 ++++++++----- .github/workflows/shared-data-test-lint-deploy.yaml | 12 ++++++++---- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/components-test-build-deploy.yaml b/.github/workflows/components-test-build-deploy.yaml index 3573d2e2d19..d102b8a8004 100644 --- a/.github/workflows/components-test-build-deploy.yaml +++ b/.github/workflows/components-test-build-deploy.yaml @@ -164,8 +164,6 @@ jobs: runs-on: 'ubuntu-latest' needs: ['js-unit-test', 'determine-build-type'] if: needs.determine-build-type.outputs.type == 'publish' - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} steps: - uses: 'actions/checkout@v3' # https://github.com/actions/checkout/issues/290 @@ -177,7 +175,6 @@ jobs: - uses: 'actions/setup-node@v3' with: node-version: '16' - registry-url: 'https://registry.npmjs.org' - name: 'cache yarn cache' uses: actions/cache@v3 with: @@ -203,9 +200,15 @@ jobs: VERSION_STRING=$(echo ${{ github.ref }} | sed 's/refs\/tags\/components@//') json -I -f ./components/package.json -e "this.version=\"$VERSION_STRING\"" json -I -f ./components/package.json -e "this.dependencies['@opentrons/shared-data']=\"$VERSION_STRING\"" + cd ./components + - uses: 'actions/setup-node@v3' + with: + node-version: '16' + registry-url: 'https://registry.npmjs.org' - name: 'publish to npm registry' - run: | - cd ./components && echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ./.yarnrc && yarn publish --access public + run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/shared-data-test-lint-deploy.yaml b/.github/workflows/shared-data-test-lint-deploy.yaml index 4e871a7d56f..e0859e72c9c 100644 --- a/.github/workflows/shared-data-test-lint-deploy.yaml +++ b/.github/workflows/shared-data-test-lint-deploy.yaml @@ -215,8 +215,6 @@ jobs: runs-on: 'ubuntu-latest' needs: ['js-test', 'publish-switch'] if: needs.publish-switch.outputs.should_publish == 'true' - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} steps: - uses: 'actions/checkout@v3' # https://github.com/actions/checkout/issues/290 @@ -253,7 +251,13 @@ jobs: npm install -g json VERSION_STRING=$(echo ${{ github.ref }} | sed -E 's/refs\/tags\/(components|shared-data)@//') json -I -f ./shared-data/package.json -e "this.version=\"$VERSION_STRING\"" + cd ./shared-data + - uses: 'actions/setup-node@v3' + with: + node-version: '16' + registry-url: 'https://registry.npmjs.org' - name: 'publish to npm registry' - run: | - cd ./components && echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ./.yarnrc && yarn publish --access public + run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}