mirror of
https://github.com/aleleba/create-react-component-library.git
synced 2025-01-09 21:26:58 -06:00
30 lines
729 B
YAML
30 lines
729 B
YAML
name: NPM testing and publish package
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
registry-url: https://registry.npmjs.org/
|
|
- run: npm ci --legacy-peer-deps
|
|
- run: npm test
|
|
|
|
publish-npm:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
registry-url: https://registry.npmjs.org/
|
|
- run: npm ci --legacy-peer-deps
|
|
- run: npm publish --access=public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |