James/memoize survey factory (#212) #85
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 to npm (trusted publisher) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write # required for npm trusted publisher (OIDC) | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Use latest npm (trusted publisher support) | |
| run: npm install -g npm@latest | |
| - run: npm ci | |
| - run: npm run build | |
| # OIDC auth: no token needed when using trusted publishers | |
| - run: npm publish |