chore: add publish workflow · jonschlinkert/word-wrap@6fd7275 (original) (raw)
Navigation Menu
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 6fd7275
chore: add publish workflow
1 file changed
Lines changed: 19 additions & 0 deletions
File tree
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| 1 | +name: Publish Package to npmjs | |
| 2 | +on: | |
| 3 | +release: | |
| 4 | +types: [published] | |
| 5 | +jobs: | |
| 6 | +build: | |
| 7 | +runs-on: ubuntu-latest | |
| 8 | +steps: | |
| 9 | + - uses: actions/checkout@v3 | |
| 10 | +# Setup .npmrc file to publish to npm | |
| 11 | + - uses: actions/setup-node@v3 | |
| 12 | +with: | |
| 13 | +node-version: '18.x' | |
| 14 | +registry-url: 'https://registry.npmjs.org' | |
| 15 | + - run: npm install | |
| 16 | + - run: npx jest | |
| 17 | + - run: npm publish | |
| 18 | +env: | |
| 19 | +NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |