diff --git a/.github/workflows/tauri_build.yml b/.github/workflows/tauri_build.yml new file mode 100644 index 0000000..5e8be8c --- /dev/null +++ b/.github/workflows/tauri_build.yml @@ -0,0 +1,55 @@ +name: 'Tauri Build' +on: + push: + branches: [ master ] + +jobs: + test-tauri: + strategy: + fail-fast: false + matrix: + platform: [macos-latest, ubuntu-20.04, windows-latest] + + runs-on: ${{ matrix.platform }} + defaults: + run: + working-directory: ./pyrgos-gui + steps: + - uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Rust setup + uses: dtolnay/rust-toolchain@stable + + - name: Rust cache + uses: swatinem/rust-cache@v2 + with: + workspaces: './src-tauri -> target' + + - name: Install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + + - name: Install Frontend dependencies + run: yarn install # change this to npm or pnpm depending on which one you use + + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build the app + uses: tauri-apps/tauri-action@v0 + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload ${{ matrix.platform }} + uses: actions/upload-artifact@v3 + if: "!startsWith(matrix.platform, 'macos')" + with: + name: ${{ matrix.platform }} + path: "${{ join(fromJSON(steps.build_os.outputs.artifactPaths), '\n') }}"