fix(deps): update angular monorepo to v21 (major) #1817
This file contains hidden or 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: Angular Library CI Pipeline | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| release: | |
| types: [created] | |
| jobs: | |
| ci: | |
| name: Build, Test, and Analyse | |
| if: github.event_name != 'release' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.x' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Lint code | |
| run: yarn lint | |
| - name: Audit vulnerabilities (known issues check) | |
| run: yarn audit:check | |
| - name: Build library | |
| run: yarn build | |
| - name: Run unit tests | |
| run: yarn test --watch=false --code-coverage | |
| - name: Analyze with SonarCloud | |
| uses: SonarSource/sonarqube-scan-action@v7.0.0 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| release: | |
| name: Release and Publish | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository (Release) | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.release.target_commitish }} | |
| - name: Validate and extract release information | |
| id: release | |
| uses: manovotny/github-releases-for-automated-package-publishing-action@v2.0.1 | |
| - name: Setup Node.js (Release) | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24.x' | |
| - name: Ensure npm version (Trusted Publishing) | |
| run: | | |
| npm --version | |
| npm i -g npm@11.5.1 | |
| npm --version | |
| - name: Install dependencies (Release) | |
| run: yarn install --frozen-lockfile | |
| - name: Build library (Release) | |
| run: yarn build | |
| - name: Publish version (OIDC via npm) | |
| working-directory: dist/opal-frontend-common | |
| run: | | |
| # Ensure we do NOT publish using token-based auth (classic/granular). | |
| unset NODE_AUTH_TOKEN | |
| # Use a fresh npm user config with no auth token to force OIDC Trusted Publishing. | |
| export NPM_CONFIG_USERCONFIG="$RUNNER_TEMP/npmrc-noauth" | |
| printf "registry=https://registry.npmjs.org/\n" > "$NPM_CONFIG_USERCONFIG" | |
| # Defensive: remove any auth token entries if something tries to inject them. | |
| npm config delete //registry.npmjs.org/:_authToken || true | |
| npm config delete _authToken || true | |
| npm publish --access public |