Build bundle and binaries #12
Workflow file for this run
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: Build bundle and binaries | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.[0-9]+.[0-9]+** | |
| concurrency: | |
| group: ci-build | |
| env: | |
| DO_NOT_TRACK: 1 | |
| jobs: | |
| bundle: | |
| runs-on: blacksmith-4vcpu-ubuntu-2204 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jdx/mise-action@v2 | |
| with: | |
| version: 2025.2.7 | |
| install: true | |
| cache: true | |
| - name: Restore Bun dependencies cache | |
| uses: useblacksmith/cache@v5 | |
| continue-on-error: false | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-bun-deps-${{ hashFiles('bun.lock') }} | |
| restore-keys: ${{ runner.os }}-bun-deps- | |
| - name: Bun install | |
| run: bun install --frozen-lockfile | |
| - name: Build bundle | |
| run: bun run build | |
| - name: Create NPM archive | |
| run: bun pm pack | |
| - name: Archive build artificats | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bundle/dist | |
| path: | | |
| dist | |
| *.tgz | |
| compile: | |
| runs-on: blacksmith-4vcpu-ubuntu-2204 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jdx/mise-action@v2 | |
| with: | |
| version: 2025.2.7 | |
| install: true | |
| cache: true | |
| - name: Get bun version | |
| run: echo "bun_version=$(bun --version)" >> $GITHUB_ENV | |
| - name: Restore Bun dependencies cache | |
| uses: useblacksmith/cache@v5 | |
| continue-on-error: false | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-bun-deps-${{ hashFiles('bun.lock') }} | |
| restore-keys: ${{ runner.os }}-bun-deps- | |
| - name: Restore Bun binaries cache | |
| uses: useblacksmith/cache@v5 | |
| continue-on-error: false | |
| with: | |
| path: ~/.bun/installs/cache/bun-*-v${{ env.bun_version }} | |
| key: ${{ runner.os }}-bun-bins-${{ hashFiles(format('~/.bun/install/cache/bun-*-v{0}', env.bun_version)) }} | |
| restore-keys: ${{ runner.os }}-bun-bins- | |
| - name: Bun install | |
| run: bun install --frozen-lockfile | |
| - name: Build binaries | |
| run: bun run build:bin | |
| - name: Archive build artificats | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: compile/dist | |
| path: | | |
| dist |