Skip to content

Commit abeef34

Browse files
committed
#173 Upgrade Tauri to v2
1 parent e622b42 commit abeef34

File tree

11 files changed

+5707
-945
lines changed

11 files changed

+5707
-945
lines changed

.github/workflows/build-tauri.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,37 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
platform: [macos-latest, macos-13, ubuntu-20.04, windows-latest]
15+
include:
16+
- platform: 'macos-latest'
17+
args: '--target aarch64-apple-darwin'
18+
- platform: 'macos-latest'
19+
args: '--target x86_64-apple-darwin'
20+
- platform: 'ubuntu-22.04'
21+
args: ''
22+
- platform: 'windows-latest'
23+
args: ''
1624

1725
runs-on: ${{ matrix.platform }}
1826
steps:
1927
- uses: actions/checkout@v4
2028
- name: Setup node
2129
uses: actions/setup-node@v4
2230
with:
23-
node-version: 22
31+
node-version: lts/*
2432
- name: Install Rust stable
2533
uses: dtolnay/rust-toolchain@stable
34+
with:
35+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
36+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
2637
- name: Rust cache
2738
uses: swatinem/rust-cache@v2
2839
with:
2940
workspaces: './tauri -> target'
30-
- name: Install dependencies (ubuntu only)
31-
if: matrix.platform == 'ubuntu-20.04'
41+
- name: install dependencies (ubuntu only)
42+
if: matrix.platform == 'ubuntu-22.04'
3243
run: |
3344
sudo apt-get update
34-
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
45+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
3546
- name: Pull gh-pages from github
3647
run: |
3748
git clone -b gh-pages --depth 1 https://github.com/railmapgen/railmapgen.github.io.git ui
@@ -54,7 +65,7 @@ jobs:
5465
f=open('tauri/tauri.conf.json', 'r+');
5566
conf=json.load(f);
5667
d=date.today()
57-
conf['package']['version']=f'{d.year-2000}.{d.month}.{d.day}';
68+
conf['version']=f'{d.year-2000}.{d.month}.{d.day}';
5869
f.seek(0);
5970
json.dump(conf,f,indent=2);
6071
f.truncate();
@@ -111,3 +122,4 @@ jobs:
111122
Rail Map Toolkit is able to run offline with these packages, but we do RECOMMEND using the [Official Website](https://railmapgen.org/) as it provides the latest features of Rail Map Toolkit. The packages below are only suitable for extreme situations where users are behind the notorious firewall or simply offline. All resources are cached and bundled.
112123
releaseDraft: false
113124
prerelease: false
125+
args: ${{ matrix.args }}

0 commit comments

Comments
 (0)