Revert "Try appimage fix" #231
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 CrossCode" | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: "ubuntu-22.04" | |
args: "" | |
- platform: "windows-latest" | |
args: "" | |
# - platform: "macos-latest" | |
# args: "--target aarch64-apple-darwin" | |
# - platform: "macos-latest" | |
# args: "--target x86_64-apple-darwin" | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust and bun dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
src-tauri/target | |
node_modules | |
key: ${{ runner.os }}-crosscode-${{ hashFiles('**/Cargo.lock', 'package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-crosscode- | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
- name: Install Linux dependencies | |
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 perl make | |
- name: Add MSVC to PATH | |
if: matrix.platform == 'windows-latest' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install Perl and Make for Windows | |
if: matrix.platform == 'windows-latest' | |
run: | | |
choco install strawberryperl make --no-progress | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install frontend dependencies | |
run: bun i --frozen-lockfile | |
- name: Clean old bundles | |
run: bunx rimraf src-tauri/target/release/bundle | |
- name: Build for Development | |
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: | |
args: ${{ matrix.args }} | |
includeUpdaterJson: ${{ github.event_name == 'release' }} | |
releaseId: ${{ github.event_name == 'release' && github.event.release.id || '' }} | |
- name: Upload Linux DEB | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'ubuntu-22.04' | |
with: | |
name: linux-deb | |
path: ${{ github.workspace }}/src-tauri/target/release/bundle/**/*.deb | |
- name: Upload Linux RPM | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'ubuntu-22.04' | |
with: | |
name: linux-rpm | |
path: ${{ github.workspace }}/src-tauri/target/release/bundle/**/*.rpm | |
- name: Upload Linux AppImage | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'ubuntu-22.04' | |
with: | |
name: linux-appimage | |
path: ${{ github.workspace }}/src-tauri/target/release/bundle/**/*.AppImage | |
- name: Upload Windows EXE | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'windows-latest' | |
with: | |
name: windows-exe | |
path: | | |
${{ github.workspace }}/src-tauri/target/release/bundle/**/*.exe |