Skip to content

Commit ac2134c

Browse files
committed
chore: optimized for binary size minification with UPX
1 parent d706ff7 commit ac2134c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ jobs:
2121
deno task build:linux
2222
deno task build:macos
2323
deno task build:windows
24+
- name: Compress binaries with UPX
25+
26+
- name: Compress binaries with UPX
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y upx-ucl
30+
upx --best --lzma devstream || true
31+
upx --best --lzma devstream.exe || true
32+
# Note: UPX doesn't work well with macOS binaries
2433
2534
- name: Create Release
2635
uses: softprops/action-gh-release@v2

deno.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"singleQuote": false
2525
},
2626
"tasks": {
27-
"build:linux": "deno compile --no-npm --no-check -A --target=x86_64-unknown-linux-gnu --output=devstream main.ts",
28-
"build:macos": "deno compile --no-npm --no-check -A --target=x86_64-apple-darwin --output=devstream.darwin main.ts",
29-
"build:windows": "deno compile --no-npm --no-check -A --target=x86_64-pc-windows-msvc --output=devstream.exe main.ts",
27+
"build:linux": "deno compile --no-npm --no-check --allow-read --allow-write --allow-net --allow-env --allow-run --target=x86_64-unknown-linux-gnu --output=devstream main.ts",
28+
"build:macos": "deno compile --no-npm --no-check --allow-read --allow-write --allow-net --allow-env --allow-run --target=x86_64-apple-darwin --output=devstream.darwin main.ts",
29+
"build:windows": "deno compile --no-npm --no-check --allow-read --allow-write --allow-net --allow-env --allow-run --target=x86_64-pc-windows-msvc --output=devstream.exe main.ts",
3030
"test": "deno test --allow-all",
3131
"lint": "deno lint --allow-all",
3232
"format": "deno fmt",

0 commit comments

Comments
 (0)