convert codebase to bun workspace (#11) #27
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: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write # Required for OIDC | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: { fetch-depth: 0 } | |
| - uses: oven-sh/setup-bun@v2 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Create Release PR or Detect Publishable Versions | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: bun run changeset:version | |
| commit: "chore: release" | |
| title: "chore: release" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to npm | |
| if: steps.changesets.outputs.hasChangesets == 'false' | |
| working-directory: packages/classy-store | |
| run: | | |
| npm install -g npm@latest | |
| npm publish --provenance --access public | |
| - name: Create git tags | |
| if: steps.changesets.outputs.hasChangesets == 'false' | |
| run: | | |
| npx changeset tag | |
| git push --follow-tags | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |