fix: run full lifecycle for named installs #88
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| - { bun: bun-linux-x64, name: linux-x64 } | |
| - { bun: bun-linux-arm64, name: linux-arm64 } | |
| - { bun: bun-darwin-x64, name: darwin-x64 } | |
| - { bun: bun-darwin-arm64, name: darwin-arm64 } | |
| - { bun: bun-windows-x64, name: windows-x64 } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - run: | | |
| bun install | |
| EXT="" | |
| if echo "${{ matrix.target.name }}" | grep -q windows; then EXT=".exe"; fi | |
| bun build --compile \ | |
| --define 'process.env.DOT_VERSION="${{ github.ref_name }}"' \ | |
| --target=${{ matrix.target.bun }} \ | |
| src/index.ts \ | |
| --outfile dist/dot-${{ matrix.target.name }}${EXT} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dot-${{ matrix.target.name }} | |
| path: dist/dot-${{ matrix.target.name }}${{ contains(matrix.target.name, 'windows') && '.exe' || '' }} |