Browse Source

fix workflow script, env vars are in proper places

master
Andrew Kaiser 4 years ago
parent
commit
1876449fc9
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      .github/workflows/npm-publish.yml

+ 8
- 3
.github/workflows/npm-publish.yml View File

@ -13,15 +13,20 @@ jobs:
with: with:
node-version: 12 node-version: 12
registry-url: https://registry.npmjs.org/ registry-url: https://registry.npmjs.org/
- run: npm version --no-git-tag-version $TAG
env: env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
GITHUB_TOKEN: ${{ secrets.github_token }}
TAG: ${{ github.ref }} TAG: ${{ github.ref }}
- run: npm version --no-git-tag-version $TAG
- run: npm publish - run: npm publish
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- run: git fetch origin master - run: git fetch origin master
- run: git checkout master - run: git checkout master
- run: git add package.json - run: git add package.json
- run: git commit --messsage "release $TAG" - run: git commit --messsage "release $TAG"
env:
TAG: ${{ github.ref }}
- run: git remote add deploy https://${GITHUB_TOKEN}@github.com/${{ github.repository }}.git - run: git remote add deploy https://${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- run: git push deploy master - run: git push deploy master

Loading…
Cancel
Save