chore: add repository field to package.json #2
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
| # Publish wx-server-sdk to npmjs.org via GitHub Actions. | |
| # | |
| # Auth: npm Trusted Publishing (OIDC) + provenance — no npm token required. | |
| # A Trusted Publisher must be configured for this package on npmjs.org, | |
| # bound to this repository and this workflow file (publish.yml). | |
| # | |
| # Trigger: only when a v* tag is pushed. | |
| name: Publish Package to npmjs | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| id-token: write # required for OIDC Trusted Publishing | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| # OIDC Trusted Publishing + provenance requires npm >= 11.5.1. | |
| # The npm bundled with the runner may be too old and silently skip OIDC. | |
| - name: Upgrade npm for OIDC | |
| run: | | |
| npm install -g npm@latest | |
| npm --version | |
| - name: Publish to npm with provenance | |
| run: npm publish --provenance --access public |