mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-11 20:00:29 +01:00
Use tauri action
This commit is contained in:
68
.github/workflows/artifacts.yml
vendored
68
.github/workflows/artifacts.yml
vendored
@@ -10,74 +10,36 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||
# platform: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||
platform: [ macos-latest ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: 'npm'
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
~/.cargo/bin
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Install stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install webkit2gtk (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.0
|
||||
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cargo install rsw wasm-pack
|
||||
cargo install rsw
|
||||
npm install -g wasm-pack
|
||||
npm ci
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
|
||||
- name: Build artifacts
|
||||
working-directory: ./src-tauri
|
||||
run: npm run tauri-build
|
||||
- uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||
|
||||
- name: Upload Ubuntu Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
with:
|
||||
name: linux-updater-artifacts
|
||||
path: |
|
||||
./src-tauri/target/release/bundle/appimage/*.AppImage.*
|
||||
|
||||
- name: Upload Windows Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
if: matrix.platform == 'windows-latest'
|
||||
with:
|
||||
name: windows-updater-artifacts
|
||||
path: |
|
||||
./src-tauri/target/release/bundle/msi/*
|
||||
|
||||
- name: Upload MacOS Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
if: matrix.platform == 'macos-latest'
|
||||
with:
|
||||
name: macos-updater-artifacts
|
||||
path: |
|
||||
./src-tauri/target/release/bundle/macos/*.app
|
||||
./src-tauri/target/release/bundle/macos/*.app.tar.gz
|
||||
./src-tauri/target/release/bundle/macos/*.sig
|
||||
./src-tauri/target/release/bundle/dmg/*.dmg
|
||||
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
|
||||
releaseName: 'App v__VERSION__'
|
||||
releaseBody: 'See the assets to download this version and install.'
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
|
||||
Reference in New Issue
Block a user