Skip to content

Commit

Permalink
Merge pull request #539 from Shopify/publish_experimental_setup_node_…
Browse files Browse the repository at this point in the history
…npmrc

Update publish-experimental-build.yml to setup npmrc with setup-node action
  • Loading branch information
rachel-carvalho authored Dec 13, 2023
2 parents 0ef92c7 + 200bf3a commit be169de
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/publish-experimental-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ jobs:
with:
ref: experimental

# Setup .npmrc file to publish to npm
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install dependencies
run: yarn --frozen-lockfile
Expand All @@ -27,10 +31,8 @@ jobs:
- name: Version
run: yarn changeset version --snapshot experimental

- name: Setup .npmrc with NPM token
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN\n" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to NPM
run: yarn changeset publish --tag experimental
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit be169de

Please sign in to comment.