Skip to content

Commit 941a104

Browse files
committed
build: create icons and desktop file
1 parent fc132c9 commit 941a104

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

.github/actions/build-linux/action.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ runs:
3030
npm run tauri build
3131
shell: bash
3232

33+
- name: Create icons and desktop file
34+
run: |
35+
chmod +x ./scripts/snap/create-desktop-file.sh
36+
./scripts/snap/create-desktop-file.sh ${{ github.workspace }}/src-tauri/target/release
37+
cp ${{ github.workspace }}/src-tauri/icons ${{ github.workspace }}/src-tauri/target/release/icons -r
38+
shell: bash
39+
3340
- name: Zip to preserve permissions
3441
run: |
3542
cd src-tauri/target/release
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Ensure the script fails on errors
4+
set -e
5+
6+
# Check if the correct number of arguments are passed
7+
if [ "$#" -ne 1 ]; then
8+
echo "Usage: $0 <release_dir>"
9+
exit 1
10+
fi
11+
12+
# Assign arguments to variables
13+
RELEASE_DIR="$1"
14+
15+
# Create the algokit-explorer.desktop file
16+
cat > "${RELEASE_DIR}/algokit-explorer.desktop" <<EOF
17+
[Desktop Entry]
18+
Name=algokit-explorer
19+
Exec=algokit-explorer %U
20+
Terminal=false
21+
Icon=${SNAP}/icons/128x128.png
22+
Type=Application
23+
Comment=algokit-explorer
24+
EOF
25+
26+
echo "algokit-explorer.desktop has been created at ${RELEASE_DIR}/algokit-explorer.desktop"

scripts/snap/create-snapcraft-yaml.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55

66
# Check if the correct number of arguments are passed
77
if [ "$#" -ne 4 ]; then
8-
echo "Usage: $0 <destination_directory> <release_tag> <artifact_path> <grade>"
8+
echo "Usage: $0 <destination_directory> <release_tag> <grade> <source_dir>"
99
exit 1
1010
fi
1111

0 commit comments

Comments
 (0)