Skip to content

Commit

Permalink
feat: add an action to publish pkg on releases (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
BjrInt authored Mar 2, 2023
1 parent 50345d5 commit e2ab586
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Packages (NPM & Github)
on:
release:
types: [published]

jobs:
build-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

build-github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://npm.pkg.github.com"
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e2ab586

Please sign in to comment.