feat: add CLI support with command line arguments and server mode #13
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| env: | |
| APP_NAME: fetch-github-hosts | |
| jobs: | |
| build-tauri: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # macOS - Universal binary (Intel + Apple Silicon) | |
| - platform: macos-latest | |
| args: --target universal-apple-darwin | |
| rust_targets: aarch64-apple-darwin,x86_64-apple-darwin | |
| name: macos-universal | |
| # Linux | |
| - platform: ubuntu-22.04 | |
| args: '' | |
| rust_targets: '' | |
| name: linux-x86_64 | |
| # Windows | |
| - platform: windows-latest | |
| args: '' | |
| rust_targets: '' | |
| name: windows-x86_64 | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'npm' | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.rust_targets }} | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| - name: Install system dependencies (Linux) | |
| 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 \ | |
| pkg-config \ | |
| libglib2.0-dev \ | |
| libgtk-3-dev \ | |
| libgdk-pixbuf2.0-dev \ | |
| libpango1.0-dev \ | |
| libatk1.0-dev \ | |
| libcairo-gobject2 \ | |
| libjavascriptcoregtk-4.1-dev | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Build static frontend | |
| run: NUXT_CLI_WRAPPER=false npx nuxt generate | |
| shell: bash | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tagName: ${{ github.ref_name }} | |
| releaseName: 'Fetch Github Hosts ${{ github.ref_name }}' | |
| releaseBody: | | |
| See the assets below to download the app for your platform. | |
| **macOS**: `.dmg` (Universal binary - supports both Intel & Apple Silicon) | |
| **Windows**: `.msi` / `.exe` | |
| **Linux**: `.deb` / `.AppImage` | |
| releaseDraft: true | |
| prerelease: false | |
| args: ${{ matrix.args }} |