feat(build)!: migrate to Bun and add standalone binary compilation (#10) #17
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 | |
| workflow_dispatch: | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write # Required for OIDC/trusted publishing | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: release | |
| url: https://www.npmjs.com/package/h2m-parser | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 | |
| with: | |
| fetch-depth: 0 # Fetch all history for changesets | |
| persist-credentials: false | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2 | |
| with: | |
| bun-version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| always-auth: true | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Verify build | |
| run: | | |
| bun lint | |
| bun typecheck | |
| bun test | |
| bun run build | |
| - name: Create Release Pull Request or Publish | |
| id: changesets | |
| uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba #v1.5.3 | |
| with: | |
| publish: bun changeset publish | |
| version: bun changeset version | |
| commit: 'chore(release): version packages' | |
| title: 'chore(release): version packages' | |
| createGithubReleases: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: 'true' | |
| - name: Publish notification | |
| if: steps.changesets.outputs.published == 'true' | |
| run: | | |
| echo "🎉 Published packages:" | |
| echo "$PUBLISHED_PACKAGES" | |
| env: | |
| PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }} |