ci: unpin node version in release workflow #248
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: Test, Publish and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build workspace | |
| run: bun run build | |
| - name: Run tests | |
| run: bun run test | |
| release: | |
| name: Changesets Release | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: latest | |
| package-manager-cache: false | |
| - name: Upgrade npm | |
| run: | | |
| npm install -g npm@latest | |
| npm --version | |
| node --version | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build publishable packages | |
| run: bunx turbo run build --filter={./packages/*} | |
| - name: Create Release Pull Request or Publish | |
| uses: changesets/action@v1 | |
| with: | |
| version: bun run ci:version | |
| publish: bun run ci:publish | |
| commit: "chore: version packages" | |
| title: "chore: version packages" | |
| createGithubReleases: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |