From 1876449fc947729a30e52fe1501e47b2b51bd3a1 Mon Sep 17 00:00:00 2001 From: Andrew Kaiser Date: Tue, 20 Oct 2020 21:54:37 -0400 Subject: [PATCH] fix workflow script, env vars are in proper places --- .github/workflows/npm-publish.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index e5ccd21..d14c89a 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -13,15 +13,20 @@ jobs: with: node-version: 12 registry-url: https://registry.npmjs.org/ + - run: npm version --no-git-tag-version $TAG env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - GITHUB_TOKEN: ${{ secrets.github_token }} TAG: ${{ github.ref }} - - run: npm version --no-git-tag-version $TAG - run: npm publish + env: + GITHUB_TOKEN: ${{ secrets.github_token }} + NODE_AUTH_TOKEN: ${{secrets.npm_token}} - run: git fetch origin master - run: git checkout master - run: git add package.json - run: git commit --messsage "release $TAG" + env: + TAG: ${{ github.ref }} - run: git remote add deploy https://${GITHUB_TOKEN}@github.com/${{ github.repository }}.git + env: + GITHUB_TOKEN: ${{ secrets.github_token }} - run: git push deploy master