@@ -96,18 +96,19 @@ jobs:
9696 id : package
9797 working-directory : logseq-src/static
9898 run : |
99- mkdir -p builds/unpacked
100- zip_file=$(echo out/make/zip/linux/x64/*-linux-x64-*.zip)
101- unzip -q "$zip_file" -d builds/unpacked
102- inner=$(find builds/unpacked -maxdepth 1 -type d -name "Logseq-linux-x64*" | head -n1)
103- if [ -z "$inner" ]; then
104- echo "Could not locate packaged Logseq bundle" >&2
99+ set -euo pipefail
100+ mkdir -p out
101+ src_dir="out/Logseq-linux-x64"
102+ if [ ! -d "$src_dir" ]; then
103+ echo "Could not locate packaged Logseq bundle at $src_dir" >&2
104+ find out -maxdepth 2 -mindepth 1 -print >&2 || true
105105 exit 1
106106 fi
107- tarball=out/logseq-linux-x64-${{ steps.version.outputs.value }}.tar.gz
108- tar -C "$inner" -czf "$tarball" .
109- cp VERSION out/VERSION
110- hash=$(nix hash file --type sha256 --sri "$tarball")
107+ tarball="out/logseq-linux-x64-${{ steps.version.outputs.value }}.tar.gz"
108+ tar -C "$src_dir" -czf "$tarball" .
109+ printf '%s\n' "${{ steps.version.outputs.value }}" > out/VERSION
110+ sha=$(sha256sum "$tarball" | awk '{print $1}')
111+ hash=$(python -c 'import base64, binascii, sys; print("sha256-" + base64.b64encode(binascii.unhexlify(sys.argv[1])).decode())' "$sha")
111112 echo "hash=$hash" >> "$GITHUB_OUTPUT"
112113 - name : Upload build artifacts
113114 uses : actions/upload-artifact@v4
@@ -186,4 +187,3 @@ jobs:
186187 run : |
187188 nix flake check
188189 nix build .#logseq
189- nix run .#logseq -- --version
0 commit comments