Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dkreider committed Nov 13, 2023
1 parent d687141 commit 1a2cf3a
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: NPM Publish

env:
NODE_VERSION: 18

on:
release:
types: [created]

jobs:
build-lib:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
cache: npm

- run: npm ci

- run: npm run build

publish-npm:
needs: build-lib
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
registry-url: https://registry.npmjs.org/
cache: npm

- run: npm ci
- run: npm run build

- run: npm publish dist/ngx-loading-buttons/ --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 1a2cf3a

Please sign in to comment.