Add Natwest Group and its application details. #2182
Workflow file for this run
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: npm-build | |
| # This workflow publishes releases to NPM, after checking that the version they would create does not already exist. | |
| # Hence, it will only publish if the version number in package.json is not already listed at: | |
| # https://www.npmjs.com/package/@finos/fdc3?activeTab=versions | |
| # The workflow will: | |
| # - Only trigger on a push or PR merge to a release/* branch in the repository | |
| # - Ignore Docusaurus workflow, docs/** and website/** as they don't affect the NPM module build | |
| # WARNING: the workflow does NOT confirm that the version number in package JSON matches the branch name, which should be manually confirmed | |
| on: | |
| push: | |
| branches: | |
| - release/** | |
| paths-ignore: | |
| - '.github/workflows/docusaurus.yml' | |
| pull_request: | |
| types: [opened, reopened, edited, ready_for_review] | |
| branches: | |
| - main | |
| - release/** | |
| paths-ignore: | |
| - '.github/workflows/docusaurus.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| # JOB to run change detection | |
| changes: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: read | |
| # Set job outputs to values from the filter step | |
| outputs: | |
| builtFiles: ${{ steps.filter.outputs.builtFiles }} | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 #v3.0.2 | |
| id: filter | |
| with: | |
| filters: | | |
| builtFiles: | |
| - 'packages/*/eslint*' | |
| - 'packages/*/tsconfig.json' | |
| - 'packages/*/src/**' | |
| - 'packages/*/schemas/**' | |
| - 'packages/*/package-lock.json' | |
| - 'packages/*/package.json' | |
| - 'packages/*/rollup.config.js' | |
| - 'packages/*/s2tQuicktypeUtil.js' | |
| - 'packages/fdc3-schema/code-generation/generate-type-predicates.ts' | |
| - 'toolbox/fdc3-workbench/src/**' | |
| - 'toolbox/fdc3-workbench/package.json' | |
| - 'toolbox/fdc3-workbench/package-lock.json' | |
| - 'toolbox/fdc3-workbench/eslint.config.mjs' | |
| - 'toolbox/fdc3-workbench/tsconfig.json' | |
| - 'eslint*' | |
| - 'package-lock.json' | |
| - 'package.json' | |
| - 'tsconfig.json' | |
| - '.github/workflows/package.yml' | |
| package-build: | |
| name: Build on Node ${{ matrix.node }} and ${{ matrix.os }} | |
| needs: changes | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node: [20] | |
| os: [ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout repo | |
| if: ${{ needs.changes.outputs.builtFiles == 'true' }} | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Use Node ${{ matrix.node }} | |
| if: ${{ needs.changes.outputs.builtFiles == 'true' }} | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install dependencies | |
| if: ${{ needs.changes.outputs.builtFiles == 'true' }} | |
| uses: bahmutov/npm-install@2509f13e8485d88340a789a3f7ca11aaac47c9fc #v1.8.36 | |
| - name: Lint | |
| if: ${{ needs.changes.outputs.builtFiles == 'true' }} | |
| run: npm run lint | |
| - name: Test | |
| if: ${{ needs.changes.outputs.builtFiles == 'true' }} | |
| run: npm run test | |
| - name: Build | |
| if: ${{ needs.changes.outputs.builtFiles == 'true' }} | |
| run: npm run build | |
| - name: Checkout repo | |
| if: ${{ needs.changes.outputs.builtFiles == 'false' }} | |
| run: 'echo "Build steps skipped as no relevant changes were detected"' | |
| package-publish: | |
| if: ${{ github.event_name == 'push' && needs.changes.outputs.builtFiles == 'true'}} | |
| needs: [changes,package-build] | |
| name: Publish package to ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| packages: write | |
| strategy: | |
| matrix: | |
| include: | |
| - name: 1-NPM | |
| registry: https://registry.npmjs.org | |
| token-name: NPM_TOKEN | |
| - name: 2-GitHub | |
| registry: https://npm.pkg.github.com | |
| token-name: GH_JS_REPO_TOKEN | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Configure Node | |
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
| with: | |
| node-version: 20 | |
| registry-url: ${{ matrix.registry }} | |
| always-auth: true | |
| token: ${{ secrets[matrix.token-name] }} | |
| # This shouldn't be needed, | |
| # - name: Manually Configure npm Authentication | |
| # run: | | |
| # REGISTRY="${{ matrix.registry }}" | |
| # CLEAN_REGISTRY=${REGISTRY#https://} # Strip https:// prefix | |
| # echo "//${CLEAN_REGISTRY}/:_authToken=${{ secrets[matrix.token-name] }}" > ~/.npmrc | |
| # echo "Generated .npmrc:" | |
| # cat ~/.npmrc # Debug output | |
| # NODE_AUTH_TOKEN=${{ secrets[matrix.token-name] }} | |
| # npm whoami --registry ${{ matrix.registry }} | |
| - name: Check package version | |
| id: check-version | |
| uses: tehpsalmist/npm-publish-status-action@deb911186cfe5134094f49183364da10a986e4e7 | |
| - name: Report already published status | |
| if: steps.check-version.outputs.exists == '1' | |
| run: 'echo "package version already exists in the *NPM* registry, skipping publishing"' | |
| - name: Report not yet published status | |
| if: steps.check-version.outputs.exists == '0' | |
| run: 'echo "package version does not exist in the *NPM* registry, publishing..."' | |
| - name: Publish | |
| if: steps.check-version.outputs.exists == '0' | |
| run: npm publish --provenance --access public --workspaces | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets[matrix.token-name] }} |