Skip to content

Commit

Permalink
🚀 use different strategy to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
blakek committed Nov 8, 2021
1 parent c26fa7b commit d9a937e
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ jobs:
with:
node-version: '16'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn test
- uses: pascalgn/[email protected]
name: Publish if version has been updated
- run: yarn publish
name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- uses: actions/setup-node@v2
with:
tag_name: 'v%s'
tag_message: 'v%s'
create_tag: 'true'
node-version: '16'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
- run: yarn publish
name: Publish to GitHub Packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d9a937e

Please sign in to comment.