Skip to content

Add CODEOWNERS for the frontend technical owner #67

Add CODEOWNERS for the frontend technical owner

Add CODEOWNERS for the frontend technical owner #67

name: Build and Publish
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, synchronize, reopened, edited]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.12.2'
registry-url: 'https://registry.npmjs.org'
token: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Build the project
run: npm run build
# The guard's own regression cases, so a refactor that silently stops catching names fails here.
- name: Test the brand guard
run: node scripts/check-brand-package.test.mjs
# Runs on pull requests too, so a branded name is caught before it can be merged and published.
- name: Assert the package carries no company name
run: node scripts/check-brand-package.mjs
- name: Publish to npm
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}