Skip to content

Commit 64f705f

Browse files
#259 Render images using resvg (#260)
1 parent d1ccc69 commit 64f705f

File tree

13 files changed

+6208
-837
lines changed

13 files changed

+6208
-837
lines changed

.github/workflows/build-tauri.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Publish App
22
on:
33
workflow_dispatch:
4-
# schedule:
5-
# # Runs "at 00:00 on day-of-month 1" (see https://crontab.guru)
6-
# - cron: '0 0 1 * *'
4+
schedule:
5+
# Runs "at 00:00 on day-of-month 1" (see https://crontab.guru)
6+
- cron: '0 0 1 * *'
77

88
jobs:
99
publish-tauri:
@@ -27,24 +27,23 @@ jobs:
2727
runs-on: ${{ matrix.platform }}
2828
steps:
2929
- uses: actions/checkout@v4
30-
- name: Setup node
31-
uses: actions/setup-node@v4
32-
with:
33-
node-version: lts/*
3430
- name: Install Rust stable
3531
uses: dtolnay/rust-toolchain@stable
3632
with:
3733
target: ${{ matrix.target }}
3834
- name: Rust cache
3935
uses: swatinem/rust-cache@v2
4036
with:
41-
workspaces: './tauri -> target'
37+
key: ${{ runner.os }}-cargo-${{ hashFiles('tauri/Cargo.lock') }}
38+
restore-keys: |
39+
${{ runner.os }}-cargo-
4240
- name: install dependencies (ubuntu only)
4341
if: matrix.platform == 'ubuntu-latest'
4442
run: |
4543
sudo apt-get update
4644
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
4745
- name: Pull gh-pages from github
46+
working-directory: ./tauri
4847
run: |
4948
git clone -b gh-pages --depth 1 https://github.com/railmapgen/railmapgen.github.io.git ui
5049
cd ui
@@ -62,9 +61,10 @@ jobs:
6261
- name: Get date
6362
run: python -c "from datetime import date;import os;f=open(os.getenv('GITHUB_ENV'), 'a');f.write('date='+date.today().strftime('%Y%m%d'));f.close()"
6463
- name: Use date as version in tauri's package
64+
working-directory: ./tauri
6565
run: |
6666
python -c "from datetime import date;import json;
67-
f=open('tauri/tauri.conf.json', 'r+');
67+
f=open('tauri.conf.json', 'r+');
6868
conf=json.load(f);
6969
d=date.today()
7070
conf['version']=f'{d.year-2000}.{d.month}.{d.day}';
@@ -73,6 +73,7 @@ jobs:
7373
f.truncate();
7474
f.close()"
7575
- name: Update instance in info.json
76+
working-directory: ./tauri
7677
run: |
7778
python -c "import json;
7879
f=open('ui/info.json', 'r+');info=json.load(f);info['instance']='Tauri';f.seek(0);json.dump(info,f,indent=2);f.truncate();f.close();
@@ -108,11 +109,14 @@ jobs:
108109
env:
109110
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110111
with:
111-
projectPath: tauri
112112
tagName: tauri-${{ env.date }}
113-
releaseName: railmapgen.local.${{ env.date }}
113+
releaseName: Rail Map Toolkit Desktop Application ${{ env.date }}
114114
releaseBody: |
115-
Offline Rail Map Toolkit packages that are automatically built and published.
115+
This application bundles all necessary resources into a single executable file, providing a seamless and self-contained experience whether you're offline or behind restrictive networks.
116+
117+
Beyond fundamental access, it unlocks extra features, including enhanced large image rendering capabilities leveraging native architecture support for improved performance. Please note that some advanced features may require a subscription to access.
118+
119+
This is built and published automatically, see the following table for the version of each component.
116120
117121
| Component | Version |
118122
|--------------------|--------------------------|
@@ -124,11 +128,6 @@ jobs:
124128
|rmp-gallery |`${{ env.rmp_gallery }}` |
125129
|rmp-designer |`${{ env.rmp_designer }}` |
126130
|rma |`${{ env.rma }}` |
127-
128-
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.
129131
releaseDraft: false
130132
prerelease: false
131133
args: --target ${{ matrix.target }}
132-
owner: railmapgen
133-
repo: railmapgen.github.io
134-
releaseCommitish: main

0 commit comments

Comments
 (0)