Skip to content

🩺 Quality assurance checks on PR 758 #1641

🩺 Quality assurance checks on PR 758

🩺 Quality assurance checks on PR 758 #1641

Workflow file for this run

name: Checks
run-name: 🩺 Quality assurance checks on ${{ github.event_name == 'pull_request' && 'PR' || '🌱' }} ${{ github.event_name == 'pull_request' && github.event.number || github.ref_name }}
env:
NODE_VERSION: 18.16.1
TEST_HIDE_CONSOLE: true
# This workflow runs for Pull Requests which are not draft,
# as well as commits going to the default branch
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, ready_for_review]
# Only allow concurrent checks on the main branch to keep history
# on QA checks
concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
build-npm-package:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
name: Build and publish NPM package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
base: ${{ github.head_ref }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Adjust package version according to branch & commit
working-directory: package
run: npm version $(../tools/print-dev-version.sh) --no-git-tag-version
- name: Build NPM package
working-directory: package
run: node generate-package.js
- name: Publish NPM package with @dev tag
if: github.event_name != 'release'
working-directory: package/dist
run: npm publish --tag dev
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish NPM package
if: github.event_name == 'release'
working-directory: package/dist
run: npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}