From 7650343a66d08032160c120bd82a65fff78841a1 Mon Sep 17 00:00:00 2001 From: Adam DeHaven <2229946+adamdehaven@users.noreply.github.com> Date: Wed, 12 Jul 2023 14:39:01 -0400 Subject: [PATCH] fix(ci): pass token (#45) * fix(ci): pass token * ci: try not checking out code * ci: pass token * ci: discard tokens file change * ci: discard tokens file change * ci: restore env * chore: include tokens.md in package --- .github/workflows/test.yaml | 9 +++++++-- package.json | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c0c9657..5b49d96 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,6 +12,8 @@ jobs: test: name: Run Tests runs-on: ubuntu-latest + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }} steps: - name: Remove preview consumption comment if: github.event_name == 'pull_request' @@ -50,9 +52,12 @@ jobs: tag="pr-${{ github.event.pull_request.number }}" echo "preid=${preid}" - git checkout ${{ github.head_ref }} + # Discard changes to the tokens file before checking out the files + # git restore TOKENS.md + # TODO: Need to checkout? + # git checkout ${{ github.head_ref }} - echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }}" > .npmrc + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc yarn version --prerelease --preid ${preid} --allow-branch ${{ github.head_ref }} --no-git-tag-version --yes --amend diff --git a/package.json b/package.json index 1a7cbed..f171dc0 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "access": "public" }, "files": [ - "dist" + "dist", + "TOKENS.md" ], "main": "dist/tokens/js/cjs/index.js", "module": "dist/tokens/js/index.mjs",