Add NPM details #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
- 'release/**' | |
pull_request: | |
branches: | |
- main | |
- 'release/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
- name: Install dependencies | |
run: yarn install | |
- name: Run linters | |
run: yarn lint | |
- name: Build project | |
run: yarn build | |
- name: Run tests | |
run: yarn test | |
# TODO: publish package to NPM | |
# publish: | |
# runs-on: ubuntu-latest | |
# needs: build | |
# if: github.ref == 'refs/heads/main' | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v3 | |
# - name: Set up Node.js | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 'lts/*' | |
# - name: Install dependencies | |
# run: yarn install | |
# - name: Build project | |
# run: yarn build | |
# - name: Publish to NPM | |
# run: yarn publish --non-interactive | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |