create-node-ts-graphql-server/.github/workflows/npm-publish.yml

30 lines
729 B
YAML
Raw Normal View History

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}}