fix: ci (#507) #240
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 | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| environment: production | |
| env: | |
| NODE_OPTIONS: "--max_old_space_size=8192" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: jdx/mise-action@v2 | |
| # npm 11.5.1 or later is required for trusted publishing | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Fix executable files for changesets | |
| run: | | |
| chmod -x .husky/commit-msg | |
| - run: pnpm install --frozen-lockfile | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| publish: pnpm run release | |
| version: pnpm run version | |
| commit: "ci(changesets): version packages" | |
| title: "ci(changesets): version packages" | |
| commitMode: github-api | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Use OIDC for npm authentication instead of NPM_TOKEN | |
| NPM_TOKEN: "" # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 |