Support jest (#14) #18
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: build-test-deploy-main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-test-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install Dependencies | |
id: installdeps | |
run: npm ci | |
- name: Build Projects | |
id: buildproj | |
run: npm run build | |
- name: Run Unit Tests | |
id: unittest | |
run: npm run test | |
- name: Update NPM Credentials File | |
id: updatecredsfile | |
run: cp .npmrc-publish ~/.npmrc | |
- name: Publish to NPM | |
id: publishpackages | |
run: npx lerna publish from-package --yes | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_USER: ${{ secrets.NPM_USER }} |