Skip to content

Commit 9c35bce

Browse files
committed
Update release.yml
1 parent e77a8ce commit 9c35bce

1 file changed

Lines changed: 26 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,35 @@ jobs:
4040
- name: Build Tauri App
4141
run: npm run tauri build
4242

43-
- name: Rename installers
43+
- name: Rename installers (Windows)
44+
if: matrix.platform == 'windows-latest'
45+
shell: pwsh
46+
run: |
47+
$tag = "${{ github.ref_name }}".TrimStart('v')
48+
$name = "Type2Learn_${tag}"
49+
Get-ChildItem -Path src-tauri/target/release/bundle/nsis/*.exe -ErrorAction SilentlyContinue | ForEach-Object {
50+
Rename-Item $_ -NewName ($name + "_Windows_x64-setup.exe")
51+
}
52+
Get-ChildItem -Path src-tauri/target/release/bundle/msi/*.msi -ErrorAction SilentlyContinue | ForEach-Object {
53+
Rename-Item $_ -NewName ($name + "_Windows_x64.msi")
54+
}
55+
56+
- name: Rename installers (macOS)
57+
if: matrix.platform == 'macos-latest'
58+
shell: bash
59+
run: |
60+
TAG=${GITHUB_REF#refs/tags/v}
61+
NAME="Type2Learn_${TAG}"
62+
mv src-tauri/target/release/bundle/dmg/*.dmg "$NAME_macOS.dmg" || true
63+
64+
- name: Rename installers (Linux)
65+
if: matrix.platform == 'ubuntu-22.04'
66+
shell: bash
4467
run: |
4568
TAG=${GITHUB_REF#refs/tags/v}
4669
NAME="Type2Learn_${TAG}"
47-
if [[ "${{ matrix.platform }}" == "windows-latest" ]]; then
48-
mv src-tauri/target/release/bundle/nsis/*.exe $NAME"_Windows_x64-setup.exe" || true
49-
mv src-tauri/target/release/bundle/msi/*.msi $NAME"_Windows_x64.msi" || true
50-
elif [[ "${{ matrix.platform }}" == "macos-latest" ]]; then
51-
mv src-tauri/target/release/bundle/dmg/*.dmg $NAME"_macOS.dmg" || true
52-
elif [[ "${{ matrix.platform }}" == "ubuntu-22.04" ]]; then
53-
mv src-tauri/target/release/bundle/deb/*.deb $NAME"_Linux.deb" || true
54-
mv src-tauri/target/release/bundle/appimage/*.AppImage $NAME"_Linux.AppImage" || true
55-
fi
70+
mv src-tauri/target/release/bundle/deb/*.deb "$NAME_Linux.deb" || true
71+
mv src-tauri/target/release/bundle/appimage/*.AppImage "$NAME_Linux.AppImage" || true
5672
5773
- name: Generate Changelog
5874
id: changelog

0 commit comments

Comments
 (0)