chore: run regression suite in ci #105
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: Publish Package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # OIDC Trusted Publishing - No npm tokens needed! | |
| # npm trusts GitHub Actions directly via OIDC | |
| # See: https://docs.npmjs.com/generating-provenance-statements | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write # Required for OIDC trusted publishing | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| # OIDC Trusted Publishing requires npm >= 11.5.1. | |
| # Node 22 ships npm 10.x, which silently falls back to token auth (EOTP). | |
| - name: Upgrade npm for OIDC | |
| run: | | |
| npm install -g npm@latest | |
| npm --version | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run regression test suite | |
| run: npm test | |
| - name: Build plugin | |
| run: npm run build | |
| - name: Verify plugin | |
| run: npm run verify | |
| - name: Verify server runtime bundle | |
| run: npm run verify:runtime | |
| # No NPM_TOKEN: publish happens via OIDC Trusted Publishing. | |
| # Requires a Trusted Publisher configured on npmjs.com for this package | |
| # (Package > Settings > Trusted Publisher: this repo + semantic-release.yml). | |
| - name: Run semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true | |
| run: npx semantic-release |