[CHORE] Update CLI (#869) #853
This file contains 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: Nightly Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [dev] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build Nightly Version | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: "macos-latest" # for Arm based macs (M1 and above). | |
target: "aarch64-apple-darwin" | |
args: "app dmg --target aarch64-apple-darwin" | |
bundle-name: MacOS-aarch64 | |
bundle-path: | | |
target/**/bundle/**/*.dmg | |
target/**/bundle/**/*.app | |
- platform: "macos-latest" # for Intel based macs. | |
target: "x86_64-apple-darwin" | |
args: "app dmg --target x86_64-apple-darwin" | |
bundle-name: MacOS-x86_64 | |
bundle-path: | | |
target/**/bundle/**/*.dmg | |
target/**/bundle/**/*.app | |
- platform: "ubuntu-22.04" | |
target: "x86_64-unknown-linux-gnu" | |
args: "appimage deb rpm" | |
bundle-name: Linux | |
bundle-path: | | |
target/release/bundle/**/*.deb | |
target/release/bundle/**/*.rpm | |
target/release/bundle/**/*.AppImage | |
- platform: "windows-latest" | |
target: "x86_64-pc-windows-msvc" | |
args: "msi nsis" | |
bundle-name: Windows | |
bundle-path: | | |
target/release/bundle/**/*.msi | |
target/release/bundle/**/*.exe | |
target/release/*.exe | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Disable Updater Bundles | |
run: | | |
sed -i.old -e 's/"createUpdaterArtifacts": "v1Compatible"/"createUpdaterArtifacts": false/' owmods_gui/backend/tauri.conf.json | |
shell: bash | |
- name: Install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-22.04' | |
run: | | |
sudo apt update | |
sudo apt install libwebkit2gtk-4.1-dev \ | |
build-essential \ | |
curl \ | |
wget \ | |
file \ | |
libxdo-dev \ | |
libssl-dev \ | |
libayatana-appindicator3-dev \ | |
librsvg2-dev | |
- name: Setup Rust Toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
- name: Setup Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: v1-gui-${{ matrix.platform }}-${{ matrix.target }}-rust-cache-${{ hashFiles('Cargo.lock') }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: owmods_gui/frontend/package.json | |
cache: npm | |
cache-dependency-path: owmods_gui/frontend/package-lock.json | |
- name: Install Frontend Dependencies | |
working-directory: owmods_gui/frontend | |
run: npm install | |
- name: Install Tauri CLI | |
run: npm add -g @tauri-apps/cli | |
- name: Build GUI | |
run: tauri build --ci -b ${{ matrix.args }} | |
shell: bash | |
env: | |
VITE_COMMIT: ${{ github.sha }} | |
VITE_VERSION_SUFFIX: -nightly | |
- name: Upload GUI | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GUI-Nightly-${{ matrix.bundle-name }} | |
path: ${{ matrix.bundle-path }} |