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