Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [windows-latest, ubuntu-22.04]
platform: [windows-latest, macos-latest, ubuntu-22.04]

steps:
- name: Checkout
Expand Down Expand Up @@ -50,3 +50,6 @@ jobs:
- name: Build
run: yarn build

- name: Rust tests
run: cargo test --manifest-path src-tauri/Cargo.toml

34 changes: 32 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [windows-latest, ubuntu-22.04]
platform: [windows-latest, macos-latest, ubuntu-22.04]

steps:
- name: Checkout (tag)
Expand Down Expand Up @@ -98,14 +98,17 @@ jobs:
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf rpm

- name: Install frontend dependencies
run: yarn install --frozen-lockfile

- name: Quick web build
run: yarn build

- name: Rust tests
run: cargo test --manifest-path src-tauri/Cargo.toml

- name: Build Tauri app and publish prerelease assets
uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -116,3 +119,30 @@ jobs:
prerelease: true
tagName: ${{ needs.prepare.outputs.tag_name }}
releaseName: EndCat ${{ needs.prepare.outputs.tag_name }}

- name: Create portable exe (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
$version = "${{ needs.prepare.outputs.app_version }}"
$exe = "src-tauri/target/release/endfield-cat.exe"
if (-not (Test-Path -LiteralPath $exe)) {
throw "Missing binary: $exe"
}

$outDir = "src-tauri/target/release/bundle/portable"
New-Item -ItemType Directory -Force -Path $outDir | Out-Null
$portableExe = Join-Path $outDir ("endfield-cat_{0}_x64_portable.exe" -f $version)
Copy-Item -LiteralPath $exe -Destination $portableExe -Force

"PORTABLE_EXE=$portableExe" >> $env:GITHUB_ENV

- name: Upload portable exe to release (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$tag = "${{ needs.prepare.outputs.tag_name }}"
if (-not $env:PORTABLE_EXE) { throw "PORTABLE_EXE env is not set" }
gh release upload $tag "$env:PORTABLE_EXE" --clobber --repo "$env:GITHUB_REPOSITORY"
34 changes: 32 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [windows-latest, ubuntu-22.04]
platform: [windows-latest, macos-latest, ubuntu-22.04]

steps:
- name: Checkout (tag)
Expand Down Expand Up @@ -94,14 +94,17 @@ jobs:
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf rpm

- name: Install frontend dependencies
run: yarn install --frozen-lockfile

- name: Quick web build
run: yarn build

- name: Rust tests
run: cargo test --manifest-path src-tauri/Cargo.toml

- name: Build Tauri app and create draft release
uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -112,3 +115,30 @@ jobs:
prerelease: false
tagName: ${{ needs.prepare.outputs.tag_name }}
releaseName: EndCat ${{ needs.prepare.outputs.tag_name }}

- name: Create portable exe (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
$version = "${{ needs.prepare.outputs.app_version }}"
$exe = "src-tauri/target/release/endfield-cat.exe"
if (-not (Test-Path -LiteralPath $exe)) {
throw "Missing binary: $exe"
}

$outDir = "src-tauri/target/release/bundle/portable"
New-Item -ItemType Directory -Force -Path $outDir | Out-Null
$portableExe = Join-Path $outDir ("endfield-cat_{0}_x64_portable.exe" -f $version)
Copy-Item -LiteralPath $exe -Destination $portableExe -Force

"PORTABLE_EXE=$portableExe" >> $env:GITHUB_ENV

- name: Upload portable exe to release (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$tag = "${{ needs.prepare.outputs.tag_name }}"
if (-not $env:PORTABLE_EXE) { throw "PORTABLE_EXE env is not set" }
gh release upload $tag "$env:PORTABLE_EXE" --clobber --repo "$env:GITHUB_REPOSITORY"
10 changes: 8 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@
},
"bundle": {
"active": true,
"targets": "all",
"targets": [
"nsis",
"dmg",
"deb",
"rpm",
"appimage"
],
Comment on lines +41 to +47

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Great job on making the bundle targets explicit! This improves configuration clarity.

To further enhance the quality of the distributables, consider adding specific configuration for each target. This allows you to customize installers, define package dependencies, and set metadata for a more professional user experience.

For example, you can add deb, rpm, nsis, and dmg objects inside the bundle configuration:

"bundle": {
  // ...
  "targets": [...],
  "icon": [...],
  "deb": {
    "depends": [],
    "category": "Utility"
  },
  "nsis": {
    "license": "../LICENSE"
  }
  // ... etc.
}

You can find all available options in the Tauri configuration documentation.

"icon": [
"icons/32x32.png",
"icons/128x128.png",
Expand All @@ -47,4 +53,4 @@
"icons/icon.ico"
]
}
}
}