Build App #24
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 App | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build: | |
| name: Build | |
| permissions: | |
| contents: read | |
| actions: read | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| platform: linux | |
| arch: x86_64 | |
| ext: AppImage | |
| mxd-platform: linux-musl | |
| mxd-arch: x86_64 | |
| - os: ubuntu-24.04-arm | |
| platform: linux | |
| arch: arm64 | |
| ext: AppImage | |
| mxd-platform: linux-musl | |
| mxd-arch: aarch64 | |
| - os: windows-2025 | |
| platform: win | |
| arch: x64 | |
| ext: exe | |
| mxd-platform: windows | |
| mxd-arch: x86_64 | |
| # - os: windows-11-arm | |
| # platform: win | |
| # arch: arm64 | |
| # ext: exe | |
| # mxd-platform: windows | |
| # mxd-arch: aarch64 | |
| - os: macos-15 | |
| platform: mac | |
| arch: arm64 | |
| ext: dmg | |
| mxd-platform: darwin | |
| mxd-arch: aarch64 | |
| - os: macos-13 | |
| platform: mac | |
| arch: x64 | |
| ext: dmg | |
| mxd-platform: darwin | |
| mxd-arch: x86_64 | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Download mxd | |
| run: bun run ./scripts/download-bin.ts | |
| env: | |
| MXD_PLATFORM: ${{ matrix.mxd-platform }} | |
| MXD_ARCH: ${{ matrix.mxd-arch }} | |
| MXD_COMMIT: ${{ vars.MXD_COMMIT }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build the app | |
| run: bun run build | |
| - name: Get version from package.json | |
| id: get_version | |
| uses: koitococo/get-npm-version@v1 | |
| - name: Upload assets | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: LLMOne-${{ steps.get_version.outputs.version }}-${{ matrix.platform }}-${{ matrix.arch }} | |
| path: ./release/LLMOne-${{ steps.get_version.outputs.version }}-${{ matrix.platform }}-${{ matrix.arch }}.${{ matrix.ext }} | |
| release: | |
| name: Create Release | |
| needs: build | |
| permissions: | |
| contents: write | |
| actions: read | |
| runs-on: ubuntu-latest | |
| if: github.ref_type == 'tag' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: LLMOne-* | |
| path: ./LLMOne-artifacts/ | |
| merge-multiple: true | |
| - name: Create Release | |
| uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: LLMOne ${{ github.ref_name }} | |
| generate_release_notes: true | |
| files: | | |
| ./LLMOne-artifacts/* | |
| draft: true | |
| prerelease: false | |
| fail_on_unmatched_files: true |