fix: registry and test related logic (#175) #84
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
| # .github/workflows/release.yml | |
| name: Release Caly-Xano CLI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Set up for Trusted Publishing by NPM | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| release: | |
| if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode' | |
| name: Release CLI | |
| runs-on: ubuntu-latest | |
| env: | |
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: true | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: "pnpm" | |
| registry-url: "https://registry.npmjs.org" | |
| scope: "@calycode" | |
| always-auth: true | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Publish to npm | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| commit: "changeset-release" | |
| title: "Release Version [@coderabbitai ignore]" | |
| publish: pnpm -r publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.CHANGESETS_GH_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |