Skip to content

Commit

Permalink
ci: 👷 Add cache to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jisu-Woniu committed Nov 25, 2023
1 parent d9d4b26 commit 9a4f761
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/tauri-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

jobs:
publish-tauri:
build-tauri:
permissions:
contents: read
strategy:
Expand All @@ -21,21 +21,28 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install frontend dependencies with pnpm
run: pnpm install
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: moonrepo/setup-rust@v1
with:
channel: stable
- name: Install dependencies on Ubuntu
if: ${{ startsWith(matrix.platform, 'ubuntu') }}
run: |
sudo apt-get update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Run Rust unit tests
working-directory: ./src-tauri
run: cargo test --workspace
- id: tauri
name: Build Tauri app
uses: tauri-apps/tauri-action@v0
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/tauri-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,28 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install frontend dependencies with pnpm
run: pnpm install
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
uses: moonrepo/setup-rust@v1
with:
channel: stable
- name: Install dependencies on Ubuntu
if: ${{ startsWith(matrix.platform, 'ubuntu') }}
run: |
sudo apt-get update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Run Rust unit tests
working-directory: ./src-tauri
run: cargo test --workspace
- id: tauri
name: Build Tauri app
uses: tauri-apps/tauri-action@v0
Expand Down
7 changes: 5 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
:toc: preamble
:toc-title: 目录

https://github.com/Jisu-Woniu/digital-signature/actions/workflows/tauri.yml[
image:https://github.com/Jisu-Woniu/digital-signature/actions/workflows/tauri.yml/badge.svg[CI status]
https://github.com/Jisu-Woniu/digital-signature/actions/workflows/tauri-ci.yml[
image:https://github.com/Jisu-Woniu/digital-signature/actions/workflows/tauri-ci.yml/badge.svg[CI status]
]
https://github.com/Jisu-Woniu/digital-signature/actions/workflows/tauri-release.yml[
image:https://github.com/Jisu-Woniu/digital-signature/actions/workflows/tauri-release.yml/badge.svg[CI status]
]

使用 Tauri 开发的跨平台文件签名与校验工具。
Expand Down

0 comments on commit 9a4f761

Please sign in to comment.