name: Build and publish master

on:
   push:
      branches:
         - master
      paths-ignore:
         - "*.md"

jobs:
   build:
      runs-on: ubuntu-latest
      permissions:
         contents: read
      steps:
         - name: Harden runner
           uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # ratchet:step-security/harden-runner@v2
           with:
              disable-sudo: true
              egress-policy: block
              allowed-endpoints: >
                 github.com:443 
                 registry.npmjs.org:443
         - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4
           with:
              persist-credentials: false
         - run: corepack enable
         - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # ratchet:actions/setup-node@v4
           with:
              node-version: "24.x"
              cache: "yarn"
         - name: install deps
           run: yarn install --immutable
         - name: test
           run: yarn test
         - name: build
           run: yarn build
