Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson authored Oct 6, 2021
1 parent e52d6a9 commit 2542297
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm --ignore-scripts publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- uses: actions/setup-node@v2
with:
registry-url: https://npm.pkg.github.com/
- run: npm whoami; npm --ignore-scripts publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 2542297

Please sign in to comment.