Skip to content

Commit

Permalink
ci: fix workflows (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
chroxify authored Jul 30, 2024
1 parent fed1687 commit 4d4c6af
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 18 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/publish-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
rust_targets: 'aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
rust_targets: 'x86_64-apple-darwin'

runs-on: ${{ matrix.platform }}

Expand All @@ -29,11 +31,14 @@ jobs:
with:
node-version: lts/*

- name: install pnpm
run: npm install -g pnpm

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an if to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: add Rust targets
run: rustup target add ${{ matrix.rust_targets }}

- name: install frontend dependencies
run: cd apps/desktop && pnpm install
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test-build-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ jobs:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
rust_targets: 'aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
rust_targets: 'x86_64-apple-darwin'

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -23,16 +25,18 @@ jobs:
with:
node-version: lts/*

- name: install pnpm
run: npm install -g pnpm

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: add Rust targets
run: rustup target add ${{ matrix.rust_targets }}

- name: install frontend dependencies
run: cd apps/desktop && pnpm install

# If tagName and releaseId are omitted tauri-action will only build the app and won't try to upload any assets.
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"dev": "vite dev",
"dev:tauri": "tauri dev",
"tauri": "tauri",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
Expand All @@ -22,6 +23,7 @@
"@tauri-apps/cli": "^1.5.9",
"@types/eslint": "8.56.0",
"@types/markdown-it": "^14.1.1",
"@types/node": "^22.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"autoprefixer": "^10.4.17",
Expand Down
16 changes: 12 additions & 4 deletions apps/desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = ""
repository = ""
default-run = "app"
edition = "2021"
rust-version = "1.60"
rust-version = "1.67"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
26 changes: 20 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d4c6af

Please sign in to comment.