Skip to content

Apply Clippy to the source code (#12) #80

Apply Clippy to the source code (#12)

Apply Clippy to the source code (#12) #80

Workflow file for this run

name: Release
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
linux:
name: Build for Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y
libwebkit2gtk-4.0-dev
build-essential
curl
wget
file
libssl-dev
libgtk-3-dev
libayatana-appindicator3-dev
librsvg2-dev
- name: Build
working-directory: ./src-tauri
run: cargo build --verbose
- name: Run tests
working-directory: ./chusst-gen
run: cargo test --verbose
- name: Install React dependencies
run: npm install
if: startsWith(github.ref, 'refs/tags/')
- name: Install Rust dependencies
run: cargo install tauri-cli
if: startsWith(github.ref, 'refs/tags/')
- name: Build
working-directory: ./src-tauri
run: cargo tauri build -b deb
if: startsWith(github.ref, 'refs/tags/')
- name: Upload artifact
uses: actions/upload-artifact@v3
if: startsWith(github.ref, 'refs/tags/')
with:
name: linux
path: ./target/release/bundle/deb/chusst_*.deb
macos:
name: Build for macOS
runs-on: macos-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- name: Build
working-directory: ./src-tauri
run: cargo build --verbose
- name: Run tests
working-directory: ./chusst-gen
run: cargo test --verbose
- name: Install React dependencies
run: npm install
- name: Install Rust dependencies
run: cargo install tauri-cli
- name: Build
working-directory: ./src-tauri
run: cargo tauri build -b dmg
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: macos
path: ./target/release/bundle/dmg/chusst_*.dmg
release:
name: Create release
runs-on: ubuntu-latest
needs:
- linux
- macos
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./linux/chusst_*.deb
./macos/chusst_*.dmg