fix: key name resolution for client creation (#9) #19
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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write # required for npm trusted publishing | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate GitHub App token | |
| id: generate-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ secrets.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
| - name: Run release-please | |
| uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| if: ${{ steps.release.outputs.release_created }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| if: ${{ steps.release.outputs.release_created }} | |
| with: | |
| node-version: 22 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install latest npm (user prefix) | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| mkdir -p "$HOME/.npm-global" | |
| npm config set prefix "$HOME/.npm-global" | |
| echo "$HOME/.npm-global/bin" >> "$GITHUB_PATH" | |
| npm install -g npm@latest | |
| npm --version | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| if: ${{ steps.release.outputs.release_created }} | |
| with: | |
| version: latest | |
| - name: Install dependencies | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: pnpm build | |
| - name: Publish to npm | |
| if: ${{ steps.release.outputs.release_created }} | |
| # TODO(@mandarini): add back --provenance once repo is OSS | |
| run: npm publish --access public #--provenance |