🐛 修复bug

This commit is contained in:
Tw93
2023-07-20 18:57:41 +08:00
parent 32822f9b69
commit 7100f0636f

View File

@@ -13,57 +13,73 @@ jobs:
matrix: matrix:
build: [linux, windows, macos] build: [linux, windows, macos]
include: include:
- build: linux - build: linux
os: ubuntu-20.04 os: ubuntu-20.04
rust: stable rust: stable
target: x86_64-unknown-linux-musl target: x86_64-unknown-linux-musl
- build: windows - build: windows
os: windows-latest os: windows-latest
rust: stable-x86_64-msvc rust: stable-x86_64-msvc
target: x86_64-pc-windows-msvc target: x86_64-pc-windows-msvc
- build: macos - build: macos
os: macos-latest os: macos-latest
rust: stable rust: stable
target: x86_64-apple-darwin target: x86_64-apple-darwin
fail-fast: false fail-fast: false
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: install node - name: install node
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
- name: Install Rust - name: Install Rust
uses: dtolnay/rust-toolchain@stable uses: dtolnay/rust-toolchain@stable
with: with:
toolchain: ${{ matrix.rust }} toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }} target: ${{ matrix.target }}
- name: install dependencies (ubuntu only) - name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-20.04' if: matrix.os == 'ubuntu-20.04'
uses: awalsh128/cache-apt-pkgs-action@latest uses: awalsh128/cache-apt-pkgs-action@latest
with: with:
packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
version: 1.1 version: 1.1
- name: rust cache - name: rust cache restore
uses: Swatinem/rust-cache@v2 uses: actions/cache/restore@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: build for Ubuntu - name: build for Ubuntu
if: matrix.os == 'ubuntu-20.04' if: matrix.os == 'ubuntu-20.04'
run: npm run build:all-unix run: npm run build:all-unix
- name: build for MacOS - name: build for MacOS
if: matrix.os == 'macos-latest' if: matrix.os == 'macos-latest'
run: | run: |
rustup target add aarch64-apple-darwin rustup target add aarch64-apple-darwin
npm run build:all-unix npm run build:all-unix
- name: build for windows - name: build for windows
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
shell: pwsh shell: pwsh
run: | run: |
npm run build:all-windows npm run build:all-windows
- name: Upload files
# arg info: https://github.com/ncipollo/release-action#release-action
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "output/*/*.*"
token: ${{ secrets.GITHUB_TOKEN }}