chore(deps): lock file maintenance (#1011) #903
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 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| # Get GitHub token via the CT Changesets App | |
| - name: Generate GitHub token (via CT Changesets App) | |
| id: generate_github_token | |
| uses: tibdex/github-app-token@v2.1.0 | |
| with: | |
| app_id: ${{ secrets.CT_CHANGESETS_APP_ID }} | |
| private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }} | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| # Pass a personal access token (using our `ct-changesets` app) to be able to trigger other workflows | |
| # https://help.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token | |
| # https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8 | |
| token: ${{ steps.generate_github_token.outputs.token }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4.2.0 | |
| id: pnpm-install | |
| with: | |
| run_install: false | |
| - name: Setup Node (uses version in .nvmrc) | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Verify npm version | |
| run: | | |
| npm --version | |
| # Ensure latest npm is installed for trusted publishing (OIDC) | |
| - name: Building packages | |
| run: pnpm build | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| publish: pnpm changeset publish | |
| version: pnpm changeset:version-and-format | |
| commit: 'ci(changesets): version packages' | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }} | |
| # Publish canary releases only if the packages weren't published already | |
| - name: Publishing canary releases to npm registry | |
| if: steps.changesets.outputs.published != 'true' | |
| run: | | |
| git checkout main | |
| pnpm changeset version --snapshot canary | |
| pnpm changeset publish --tag canary | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }} |