Skip to content

Potential fix for code scanning alert no. 1: Incomplete multi-character sanitization #47

Potential fix for code scanning alert no. 1: Incomplete multi-character sanitization

Potential fix for code scanning alert no. 1: Incomplete multi-character sanitization #47

name: Verify and Release
on:
push:
branches:
- main
- develop
- next
- next-major
- beta
- alpha
- '[0-9]+.x'
- '[0-9]+.[0-9]+.x'
pull_request:
branches:
- main
- develop
- next
- next-major
- beta
- alpha
- '[0-9]+.x'
- '[0-9]+.[0-9]+.x'
permissions:
contents: read
jobs:
verify:
name: Verify
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
- name: Install dependencies
env:
HUSKY: 0
run: npm ci
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Lint library
run: npm run lint -- @ngm-dev/mat-exp
- name: Lint docs app
run: npm run lint -- mat-exp-docs
- name: Test library
run: npx ng test --project @ngm-dev/mat-exp
# - name: Test docs app
# run: npm test
# e2e:
# name: E2E
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v7
# - name: Setup Node.js
# uses: actions/setup-node@v6
# with:
# node-version-file: .nvmrc
# - name: Install dependencies
# env:
# HUSKY: 0
# run: npm ci
# - name: Build library
# run: npm run build:lib
# - name: Install Playwright browsers
# run: npx playwright install --with-deps chromium
# - name: Run e2e tests
# run: npx ng e2e --project=mat-exp-docs --test-project=chromium
# - name: Upload Playwright report
# if: failure()
# uses: actions/upload-artifact@v4
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 7
release:
name: Release
runs-on: ubuntu-latest
needs: [verify]
if: github.event_name == 'push'
permissions:
contents: write # to be able to publish a GitHub release and push to gh-pages
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
- name: Install dependencies
env:
HUSKY: 0
run: npm ci
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Build library
run: npm run build:lib
# - name: Build docs
# run: npm run build:docs
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} — using npm Trusted Publishing (OIDC) instead
run: npx semantic-release --debug
# - name: Deploy to GitHub Pages
# if: github.ref == 'refs/heads/main'
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: npx angular-cli-ghpages --name="mr. Dharmen's Bot" --email=shhdharmen@gmail.com --dir=dist/mat-exp-docs/browser