Skip to content

Commit

Permalink
Add back publish steps
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHZhang committed Oct 23, 2020
1 parent 10a1f83 commit 1fe2272
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Get tag name without prefix
id: vars
uses: actions/github-script@v3
Expand All @@ -42,16 +41,15 @@ jobs:
const tagPath = 'refs/tags/v';
const tag = context.ref.substring(tagPath.length);
core.setOutput('tag_name', tag);
- name: Upgrade version in package.json to release tag version
run: yarn version --new-version ${{ steps.vars.outputs.tag_name }}
# - name: Publish to NPM via auth token
# run: yarn publish
# env:
# # Ensure NPM_TOKEN is added to repository secrets.
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Push version changes
# run: git push
# env:
# # GITHUB_TOKEN is automatically provided by actions.
# github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NPM via auth token
run: yarn publish
env:
# Ensure NPM_TOKEN is added to repository secrets.
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push version changes
run: git push
env:
# GITHUB_TOKEN is automatically provided by actions.
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1fe2272

Please sign in to comment.