4.0.9 #158
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: "Tauri" | |
on: | |
push: | |
branches: [main] | |
tags: ["*"] | |
pull_request: | |
branches: [main] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
include: | |
- os: windows-latest | |
bundle: "msi/vscch*.msi" | |
exe: "vscch.exe" | |
- os: ubuntu-latest | |
bundle: "appimage/vscch*.AppImage" | |
exe: "vscch" | |
- os: macos-latest | |
bundle: "dmg/vscch*.dmg" | |
exe: "vscch" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: "pnpm" | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install dependencies (Linux) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt update | |
sudo apt install -y libwebkit2gtk-4.0-dev libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev | |
- run: pnpm install | |
- run: pnpm tauri build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }} executable | |
path: src-tauri/target/release/${{ matrix.exe }} | |
- name: Pack executable | |
if: ${{ github.ref_type == 'tag' }} | |
run: | | |
cd ${{ github.workspace }} | |
7z a ./src-tauri/target/vscch_${{ github.ref_name }}_${{ runner.os }}.7z ./src-tauri/target/release/${{ matrix.exe }} ./LICENSE | |
- name: Release | |
if: ${{ github.ref_type == 'tag' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
# https://github.com/softprops/action-gh-release/issues/280#issuecomment-1377056946 | |
# Assuming cwd is ${{ github.workspace }} | |
files: | | |
./src-tauri/target/release/bundle/${{ matrix.bundle }} | |
./src-tauri/target/vscch*.7z | |
draft: true |