chore: add repository metadata to package.json to fix npm provenance … #5
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: NodeJS SDK CI/CD | |
| on: | |
| pull_request: | |
| branches: [ main, master ] | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| validate: | |
| name: Build & Validate Node.js SDK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run Linter | |
| run: npm run lint | |
| - name: Verify Compilation | |
| run: npm run build | |
| publish: | |
| name: Publish to npm | |
| needs: validate | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # For Trusted Publishing OIDC provenance | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Publish Package | |
| run: npx npm@latest publish --provenance --access public |