- Added option to output duration and time #1621
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
# Set the type of machine to run on | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
if: github.ref != 'refs/heads/master' | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
always-auth: true | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org | |
scope: '@pristine' | |
- run: npm install -g [email protected] | |
- run: npm -v | |
- run: npm ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# - run: npm install | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm run build | |
- run: npx eslint --ext .ts packages/** | |
- run: npm run test | |
- run: npm run e2e | |
- run: npm run perf | |
publish: | |
name: Publish | |
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
# Set the type of machine to run on | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v2 | |
with: | |
always-auth: true | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org | |
scope: '@pristine' | |
- run: npm install -g npm@latest | |
- run: npm ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# - run: npm install | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: git config --global user.name 'ima-bot' | |
- run: git config --global user.email '[email protected]' | |
- run: npm run bump-patch | |
- run: npm whoami | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: npm run publish-ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |