|
37 | 37 | - name: Setup bun |
38 | 38 | uses: oven-sh/setup-bun@v2 |
39 | 39 |
|
40 | | - |
41 | 40 | - name: install Rust stable |
42 | 41 | uses: dtolnay/rust-toolchain@stable |
43 | 42 |
|
@@ -71,12 +70,74 @@ jobs: |
71 | 70 | releaseDraft: false |
72 | 71 | prerelease: ${{ !endsWith(github.ref_name, 'stable') }} |
73 | 72 | args: ${{ matrix.args }} |
74 | | - tauriScript: 'bun tauri' |
| 73 | + tauriScript: "bun tauri" |
75 | 74 | tagName: ${{github.ref_name}} |
76 | 75 |
|
| 76 | + publish-electron: |
| 77 | + permissions: |
| 78 | + contents: write |
| 79 | + strategy: |
| 80 | + fail-fast: false |
| 81 | + matrix: |
| 82 | + include: |
| 83 | + - platform: "blacksmith-4vcpu-windows-2025" |
| 84 | + os: "windows" |
| 85 | + arch: "x64" |
| 86 | + - platform: "blacksmith-4vcpu-ubuntu-2404" |
| 87 | + os: "linux" |
| 88 | + arch: "x64" |
| 89 | + - platform: "windows-11-arm" |
| 90 | + os: "windows" |
| 91 | + arch: "arm64" |
| 92 | + - platform: "blacksmith-4vcpu-ubuntu-2404-arm" |
| 93 | + os: "linux" |
| 94 | + arch: "arm64" |
| 95 | + runs-on: ${{ matrix.platform }} |
| 96 | + steps: |
| 97 | + - uses: actions/checkout@v4 |
| 98 | + |
| 99 | + - name: Setup bun |
| 100 | + uses: oven-sh/setup-bun@v2 |
| 101 | + |
| 102 | + - name: install Rust stable |
| 103 | + uses: dtolnay/rust-toolchain@stable |
| 104 | + |
| 105 | + - name: install dependencies (ubuntu only) |
| 106 | + if: matrix.os == 'linux' |
| 107 | + run: | |
| 108 | + sudo apt update |
| 109 | + sudo apt install -y libsecret-1-dev libarchive-tools rpm |
| 110 | +
|
| 111 | + - name: install frontend dependencies (bun) |
| 112 | + run: bun install |
| 113 | + |
| 114 | + - uses: Swatinem/rust-cache@v2 |
| 115 | + with: |
| 116 | + workspaces: "./src-tauri -> target" |
| 117 | + |
| 118 | + - name: Package Electron app |
| 119 | + env: |
| 120 | + ETERNAL_API_TOKEN: ${{ secrets.ETERNAL_API_TOKEN }} |
| 121 | + QUADRANT_API_KEY: ${{ secrets.QUADRANT_API_KEY }} |
| 122 | + QUADRANT_OAUTH2_CLIENT_ID: ${{ secrets.QUADRANT_OAUTH2_CLIENT_ID }} |
| 123 | + QUADRANT_OAUTH2_CLIENT_SECRET: ${{ secrets.QUADRANT_OAUTH2_CLIENT_SECRET }} |
| 124 | + QUADRANT_API_BASE_URL: ${{ vars.QUADRANT_API_BASE_URL }} |
| 125 | + run: bun run package:electron -- --arch=${{ matrix.arch }} |
| 126 | + |
| 127 | + - name: Upload Electron assets to release |
| 128 | + env: |
| 129 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 130 | + TAG_NAME: ${{ github.ref_name }} |
| 131 | + shell: bash |
| 132 | + run: | |
| 133 | + mapfile -d '' files < <(find dist-electron -maxdepth 1 -type f -print0) |
| 134 | + gh release upload "$TAG_NAME" "${files[@]}" --clobber |
| 135 | +
|
77 | 136 | sync_flathub: |
78 | 137 | name: Sync Flathub |
79 | | - needs: publish-tauri |
| 138 | + needs: |
| 139 | + - publish-tauri |
| 140 | + - publish-electron |
80 | 141 | if: endsWith(github.ref_name, '-stable') || endsWith(github.ref_name, '-flatpak') |
81 | 142 | uses: ./.github/workflows/flatpak.yml |
82 | 143 | secrets: inherit |
|
0 commit comments