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 and Release Binaries | |
| on: | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| build-binaries: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: linux-x64 | |
| - os: ubuntu-latest | |
| target: linux-arm64 | |
| - os: macos-latest | |
| target: darwin-x64 | |
| - os: macos-latest | |
| target: darwin-arm64 | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build web assets | |
| run: bun run build | |
| - name: Build standalone binary | |
| run: bun run build-binary.ts --target=bun-${{ matrix.target }} --outfile=dist/linkserver-${{ github.ref_name }}-${{ matrix.target }} | |
| - name: Generate checksum | |
| working-directory: dist | |
| run: shasum -a 256 linkserver-${{ github.ref_name }}-${{ matrix.target }} > linkserver-${{ github.ref_name }}-${{ matrix.target }}.sha256 | |
| - name: Upload workflow artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linkserver-${{ github.ref_name }}-${{ matrix.target }} | |
| path: | | |
| dist/linkserver-${{ github.ref_name }}-${{ matrix.target }} | |
| dist/linkserver-${{ github.ref_name }}-${{ matrix.target }}.sha256 | |
| if-no-files-found: error | |
| - name: Upload binary to release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh release upload ${{ github.ref_name }} dist/linkserver-${{ github.ref_name }}-${{ matrix.target }} dist/linkserver-${{ github.ref_name }}-${{ matrix.target }}.sha256 --clobber |