From 59d8c6994242b6044a991ba0b5472303822c1186 Mon Sep 17 00:00:00 2001 From: Florian ERNST <30944236+TheMrZZ@users.noreply.github.com> Date: Sat, 3 Oct 2020 16:18:57 +0200 Subject: [PATCH] Pushes NPM token to .npmrc --- .github/workflows/npm-publish.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3c89dab8..568835c6 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -36,7 +36,17 @@ jobs: with: node-version: 14 registry-url: https://registry.npmjs.org/ + - name: Cache npm modules + uses: actions/cache@v2.1.1 + with: + # A list of files, directories, and wildcard patterns to cache and restore + path: node_modules + # An explicit key for restoring and saving the cache + key: ${{ runner.os }}-npm-modules - run: yarn + - run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc + env: + NPM_TOKEN: ${{secrets.npm_token}} - run: npm run publishToNpm env: NPM_TOKEN: ${{secrets.npm_token}}