|
| 1 | +name: Release |
| 2 | +on: |
| 3 | + push: |
| 4 | + tags: |
| 5 | + - 'v*' |
| 6 | + |
| 7 | +jobs: |
| 8 | + release-desktop: |
| 9 | + strategy: |
| 10 | + fail-fast: false |
| 11 | + matrix: |
| 12 | + include: |
| 13 | + - platform: 'macos-latest' # usually arm64 now |
| 14 | + - platform: 'ubuntu-22.04' |
| 15 | + - platform: 'windows-latest' |
| 16 | + runs-on: ${{ matrix.platform }} |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Install pnpm |
| 21 | + uses: pnpm/action-setup@v3 |
| 22 | + with: |
| 23 | + version: 9 |
| 24 | + |
| 25 | + - name: Setup Node |
| 26 | + uses: actions/setup-node@v4 |
| 27 | + with: |
| 28 | + node-version: 20 |
| 29 | + cache: 'pnpm' |
| 30 | + cache-dependency-path: 'tauri-app/pnpm-lock.yaml' |
| 31 | + |
| 32 | + - name: Setup Rust |
| 33 | + uses: dtolnay/rust-toolchain@stable |
| 34 | + |
| 35 | + - name: Setup Deno |
| 36 | + uses: denoland/setup-deno@v1 |
| 37 | + with: |
| 38 | + deno-version: v1.46.x |
| 39 | + |
| 40 | + - name: Install Linux dependencies |
| 41 | + if: matrix.platform == 'ubuntu-22.04' |
| 42 | + run: | |
| 43 | + sudo apt-get update |
| 44 | + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf |
| 45 | +
|
| 46 | + - name: Build invidious-companion (Deno Sidecar) |
| 47 | + shell: bash |
| 48 | + run: | |
| 49 | + TARGET=$(rustc -vV | sed -n 's/host: //p') |
| 50 | + echo "Rust Target: $TARGET" |
| 51 | + cd invidious-companion |
| 52 | + deno task compile |
| 53 | + cd .. |
| 54 | + mkdir -p tauri-app/src-tauri/binaries |
| 55 | + if [ "$RUNNER_OS" = "Windows" ]; then |
| 56 | + mv invidious-companion/invidious_companion.exe "tauri-app/src-tauri/binaries/invidious-companion-$TARGET.exe" |
| 57 | + else |
| 58 | + mv invidious-companion/invidious_companion "tauri-app/src-tauri/binaries/invidious-companion-$TARGET" |
| 59 | + fi |
| 60 | +
|
| 61 | + - name: Install dependencies |
| 62 | + working-directory: ./tauri-app |
| 63 | + run: pnpm install |
| 64 | + |
| 65 | + - name: Build Tauri App |
| 66 | + uses: tauri-apps/tauri-action@v0 |
| 67 | + env: |
| 68 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} |
| 70 | + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} |
| 71 | + with: |
| 72 | + projectPath: ./tauri-app |
| 73 | + tagName: ${{ github.ref_name }} |
| 74 | + releaseName: "Release ${{ github.ref_name }}" |
| 75 | + releaseBody: "See the assets to download this version and install." |
| 76 | + releaseDraft: false |
| 77 | + prerelease: false |
| 78 | + |
| 79 | + |
0 commit comments