Skip to content

Commit 1bf8e41

Browse files
committed
build: fix snap
1 parent cb6405a commit 1bf8e41

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

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

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,10 @@ runs:
3030
npm run tauri build
3131
shell: bash
3232

33-
- name: Move binary to target directory
34-
run: |
35-
mkdir -p tauri-dist
36-
mv src-tauri/target/release/algokit-explorer tauri-dist/algokit-explorer
37-
shell: bash
38-
39-
# - name: HACK - move binary to target directory
40-
# run: |
41-
# mkdir -p tauri-dist
42-
# cp src/assets/react.svg tauri-dist/algokit-explorer
43-
# chmod +x tauri-dist/algokit-explorer
44-
# shell: bash
45-
4633
- name: Zip to preserve permissions
4734
run: |
48-
cd tauri-dist
49-
tar -czvf ../${{ steps.set-env.outputs.artifact_name }}.tar.gz .
35+
cd src-tauri/target/release
36+
tar -czvf ${{ github.workspace }}/${{ steps.set-env.outputs.artifact_name }}.tar.gz --exclude=bundle .
5037
shell: bash
5138

5239
- name: Upload binary as artifact
@@ -55,7 +42,7 @@ runs:
5542
with:
5643
if-no-files-found: error
5744
name: ${{ steps.set-env.outputs.artifact_name }}
58-
path: ${{ steps.set-env.outputs.artifact_name }}.tar.gz
45+
path: ${{ github.workspace }}/${{ steps.set-env.outputs.artifact_name }}.tar.gz
5946

6047
outputs:
6148
artifact-name:

scripts/snap/create-snapcraft-yaml.sh

100755100644
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,27 @@ parts:
3737
algokit-explorer:
3838
source: "$SOURCE_DIR"
3939
plugin: dump
40+
stage:
41+
- algokit-explorer
42+
prime:
43+
- algokit-explorer
44+
stage-packages:
45+
- libgtk-3-0
46+
- libwebkit2gtk-4.0-37
4047
4148
apps:
4249
algokit-explorer:
4350
command: algokit-explorer
51+
plugs:
52+
- desktop
53+
- desktop-legacy
54+
- home
55+
- x11
56+
- wayland
57+
- network
58+
- network-bind
59+
environment:
60+
LD_LIBRARY_PATH: $SNAP/usr/lib:$LD_LIBRARY_PATH
4461
EOF
4562

4663
echo "snapcraft.yaml has been created at ${DESTINATION_DIR}/snap/snapcraft.yaml"

0 commit comments

Comments
 (0)