Skip to content

Commit

Permalink
fix canary action
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Razon committed Aug 9, 2023
1 parent 7fedfc3 commit 111573c
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/npm-publish-canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,28 @@ jobs:

- run: yarn

- name: npm publish
- name: Set NPM token
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
set -eou pipefail
set -x
# npm auth
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
# set token at npmrc - without making the git local copy dirty
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
echo ".npmrc" >> .git/info/exclude
git update-index --assume-unchanged .npmrc
- name: Set git identity
run: |
# version git commit is not pushed, so this just needs to be configured
git config user.email "$(git log -1 --format='%ae')"
git config user.name "$(git log -1 --format='%an')"
- name: npm publish
run: |
set -eou pipefail
set -x
# this will be the NPM dist-tag
GIT_ID=$(echo "${{ github.head_ref }}" | sed 's/[^a-zA-Z0-9_-]/_/g')
Expand Down

0 comments on commit 111573c

Please sign in to comment.