Skip to content

Commit

Permalink
ci: cache rust, simplify artifact env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
ferferga authored Oct 12, 2024
1 parent 13a1846 commit 6da3ba7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/__package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ jobs:
- Windows
defaults:
run:
working-directory: packaging/tauri
working-directory: ${{ env.WORKING_DIR }}

env:
ARTIFACTS_PATH: |
${{ matrix.platform == 'ubuntu' && 'packaging/tauri/target/release/bundle/appimage_deb' || '' }}
${{ matrix.platform == 'macos' && 'packaging/tauri/target/release/bundle/macos' || '' }}
${{ matrix.platform == 'windows' && 'packaging/tauri/target/release/jellyfin-vue-tauri.exe' || '' }}
WORKING_DIR: packaging/tauri
ARTIFACTS_PATH: ${{
format('target/release/{0}', matrix.platform == 'windows' && 'jellyfin-vue-tauri.exe' ||
format('bundle/*/*.{0}', matrix.platform == 'macos' && 'dmg' || 'AppImage'))
}}

runs-on: ${{ matrix.platform }}-latest
steps:
Expand All @@ -66,6 +68,12 @@ jobs:
check-latest: true
cache: 'npm'

- name: Setup Rust Toolchain and cache 🦀
uses: actions-rust-lang/[email protected]
with:
cache-key: tauri-${{ runner.os }}
cache-workspaces: ${{ env.WORKING_DIR }}

- name: Install npm dependencies 📦
run: npm ci --no-audit

Expand All @@ -82,14 +90,14 @@ jobs:
uses: actions/[email protected]
continue-on-error: true
with:
subject-path: ${{ env.ARTIFACTS_PATH }}
subject-path: ${{ env.WORKING_DIR }}/${{ env.ARTIFACTS_PATH }}

- name: Upload built application artifact ⬆️🐧🍎🪟
uses: actions/[email protected]
with:
compression-level: 0
name: jellyfin-vue_${{ matrix.platform }}
path: ${{ env.ARTIFACTS_PATH }}
name: jellyfin-vue_${{ runner.os }}
path: ${{ env.WORKING_DIR }}/${{ env.ARTIFACTS_PATH }}

docker_inputs:
name: Prepare Docker build variables 🏷️🐳
Expand Down
2 changes: 1 addition & 1 deletion packaging/tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"targets": [
"appimage",
"msi",
"app"
"dmg"
],
"icon": [
"icons/**/*"
Expand Down

0 comments on commit 6da3ba7

Please sign in to comment.