swadhinbiswas fix: always create release on every build · 1/17/2026
92a9dfd
100 lines · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build ChanDesk Pro

on:
  push:
    branches:
      - main
    tags:
      - 'v*'
  workflow_dispatch:

permissions:
  contents: write

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          # Linux
          - platform: 'ubuntu-22.04'
            rust_target: ''
            args: ''
            name: 'linux'
          # Windows
          - platform: 'windows-latest'
            rust_target: ''
            args: ''
            name: 'windows'
          # macOS Intel
          - platform: 'macos-latest'
            rust_target: 'x86_64-apple-darwin'
            args: '--target x86_64-apple-darwin'
            name: 'macos-intel'
          # macOS Apple Silicon
          - platform: 'macos-latest'
            rust_target: 'aarch64-apple-darwin'
            args: '--target aarch64-apple-darwin'
            name: 'macos-arm'

    runs-on: ${{ matrix.platform }}
    
    steps:
      - uses: actions/checkout@v4

      - name: Setup Bun
        uses: oven-sh/setup-bun@v2
        with:
          bun-version: latest

      - name: Install Rust stable
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.rust_target }}

      - name: Install dependencies (Ubuntu)
        if: matrix.platform == 'ubuntu-22.04'
        run: |
          sudo apt-get update
          sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

      - name: Install frontend dependencies
        run: bun install

      - name: Build the app
        uses: tauri-apps/tauri-action@v0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
          TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
        with:
          tagName: v${{ github.run_number }}-${{ github.sha }}
          releaseName: 'ChanDesk Pro Build #${{ github.run_number }}'
          releaseBody: |
            ## 🚀 ChanDesk Pro - Automated Build
            
            **Commit:** ${{ github.sha }}
            **Branch:** ${{ github.ref_name }}
            
            Download the installer for your platform below.
          releaseDraft: false
          prerelease: true
          includeRelease: true
          args: ${{ matrix.args }}

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: chandesk-${{ matrix.name }}
          path: |
            src-tauri/target/release/bundle/deb/*.deb
            src-tauri/target/release/bundle/appimage/*.AppImage
            src-tauri/target/release/bundle/msi/*.msi
            src-tauri/target/release/bundle/nsis/*.exe
            src-tauri/target/release/bundle/dmg/*.dmg
            src-tauri/target/release/bundle/macos/*.app
          if-no-files-found: ignore