Skip to content

Commit

Permalink
fix(ci): pass token (#45)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
adamdehaven committed Jul 12, 2023
1 parent 6b65c84 commit 7650343
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"access": "public"
},
"files": [
"dist"
"dist",
"TOKENS.md"
],
"main": "dist/tokens/js/cjs/index.js",
"module": "dist/tokens/js/index.mjs",
Expand Down

0 comments on commit 7650343

Please sign in to comment.