diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba64d783..08fb442f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,27 @@ name: CI +defaults: + run: + shell: bash + on: push: branches: [main] paths: - "src/**" - "src-tauri/**" + - "crates/**" + - "package.json" + - "package-lock.json" - ".github/workflows/ci.yml" pull_request: branches: [main] paths: - "src/**" - "src-tauri/**" + - "crates/**" + - "package.json" + - "package-lock.json" - ".github/workflows/ci.yml" jobs: @@ -33,6 +43,12 @@ jobs: - platform: macos-latest kind: rust task: test + - platform: windows-latest + kind: js + task: test + - platform: windows-latest + kind: rust + task: test name: ${{ matrix.kind }} / ${{ matrix.task }} / ${{ matrix.platform }} runs-on: ${{ matrix.platform }} @@ -56,21 +72,21 @@ jobs: uses: cargo-bins/cargo-binstall@main - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. + if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install -y git sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf - name: Install git and jj CLI (macOS) - if: matrix.platform == 'macos-latest' + if: runner.os == 'macOS' run: | brew update brew install git jj echo "$(brew --prefix)/bin" >> $GITHUB_PATH - - name: Install jj CLI (ubuntu) - if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. + - name: Install jj CLI (non-macOS) + if: runner.os != 'macOS' run: | cargo binstall --strategies crate-meta-data jj-cli echo "$HOME/.cargo/bin" >> $GITHUB_PATH diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c448e3e0..ca20ec93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,9 @@ name: Release +defaults: + run: + shell: bash + on: workflow_dispatch: @@ -64,10 +68,10 @@ jobs: args: "--target x86_64-apple-darwin" # - platform: "macos-latest" # args: "--target universal-apple-darwin" - # - platform: 'ubuntu-22.04' - # args: '' - # - platform: 'windows-latest' - # args: '' + - platform: 'ubuntu-22.04' + args: '' + - platform: 'windows-latest' + args: '' runs-on: ${{ matrix.platform }} environment: prod steps: @@ -84,6 +88,12 @@ jobs: with: targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + - name: install dependencies (ubuntu only) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true