Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6695557

Browse files
committed
Resolve #13: Update readme with new screenshot and update distribution naming
Signed-off-by: coralsundy <[email protected]>
1 parent 5993a14 commit 6695557

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

.github/workflows/build-dist-apps.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,43 @@ jobs:
5454
run: |
5555
npm install
5656
npx tauri build
57+
58+
APP_VERSION=`jq -r '.version' src-tauri/tauri.conf.json`
59+
APP_NAME=`jq -r '.productName' src-tauri/tauri.conf.json`
60+
WEB_VERSION=`jq -r '.version' package.json`
61+
MP_VERSION=${{ github.ref_name }}
62+
APP_ARCH=`uname -m`
63+
OS=${{ matrix.os }}
64+
65+
if [ "$APP_ARCH" = "amd64" ]; then
66+
APP_ARCH="x86_64"
67+
elif [ "$APP_ARCH" = "aarch64" ]; then
68+
APP_ARCH="arm64"
69+
fi
70+
5771
cd src-tauri/target/release/bundle
5872
mkdir artifacts
59-
OS=${{ matrix.os }}
6073
if [[ "$OS" = *"ubuntu"* ]]; then
61-
PKG_RPM=`find . -name '*.rpm'`
62-
PKG_DEB=`find . -name '*.deb'`
63-
PKG_APPIMAGE=`find . -name '*.AppImage'`
64-
mv -v $PKG_RPM $PKG_DEB $PKG_APPIMAGE artifacts/
74+
OS_SHORT='linux'
75+
PKG_RPM=`find rpm -name '*.rpm'`
76+
PKG_DEB=`find deb -name '*.deb'`
77+
PKG_APPIMAGE=`find appimage -name '*.AppImage'`
6578
elif [[ "$OS" = *"windows"* ]]; then
66-
PKG_MSI=`find . -name '*.msi'`
67-
PKG_EXE=`find . -name '*.exe'`
68-
mv -v $PKG_MSI $PKG_EXE artifacts/
79+
OS_SHORT='windows'
80+
PKG_MSI=`find msi -name '*.msi'`
81+
PKG_EXE=`find nsis -name '*.exe'`
6982
elif [[ "$OS" = *"macos"* ]]; then
70-
cd dmg
71-
PKG_DMG=`find . -name '*.dmg'`
72-
mv -v $PKG_DMG ../artifacts/
83+
OS_SHORT='macos'
84+
PKG_DMG=`find dmg -name '*.dmg'`
7385
fi
7486
87+
APP_FILENAME=${APP_NAME}-${MP_VERSION}_app-v${APP_VERSION}_web-v${WEB_VERSION}_$OS_SHORT-$APP_ARCH
88+
89+
for app_dist in $PKG_RPM $PKG_DEB $PKG_APPIMAGE $PKG_MSI $PKG_EXE $PKG_DMG; do
90+
APP_FILENAME_NEW=`echo "${app_dist##*.}" | xargs -I{} echo "$APP_FILENAME.{}"`
91+
mv -v $app_dist artifacts/$APP_FILENAME_NEW
92+
done
93+
7594
- name: Upload artifacts ${{ matrix.os }}
7695
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
7796
with:

dist/img/app.png

9.06 KB
Loading

0 commit comments

Comments
 (0)