4242 key : pip-${{ runner.os }}-${{ hashFiles('requirements*.txt') }}
4343 restore-keys : pip-${{ runner.os }}-
4444
45+ - name : Cache Nuitka
46+ uses : actions/cache@v4
47+ with :
48+ path : ~/.cache/Nuitka
49+ key : nuitka-${{ runner.os }}-${{ hashFiles('**/*.py') }}
50+ restore-keys : nuitka-${{ runner.os }}-
51+
4552 - name : Install system deps (Linux)
4653 if : runner.os == 'Linux'
47- run : sudo apt-get update && sudo apt-get install -y patchelf
54+ run : sudo apt-get install -y patchelf
4855
4956 - name : MSVC setup (Windows)
5057 if : runner.os == 'Windows'
@@ -56,14 +63,10 @@ jobs:
5663 python -m pip install -U pip wheel nuitka zstandard
5764 [[ -f requirements.txt ]] && pip install -r requirements.txt || true
5865
59- - name : Write entrypoint
60- shell : bash
61- run : |
62- printf 'from bangen.app import main\nif __name__ == "__main__":\n main()\n' > _entry.py
63-
6466 - name : Build with Nuitka
6567 shell : bash
6668 run : |
69+ printf 'from bangen.app import main\nif __name__ == "__main__":\n main()\n' > _entry.py
6770 python -m nuitka \
6871 --mode=onefile \
6972 --assume-yes-for-downloads \
8184 NAME="bangen-${{ matrix.name }}-${{ github.ref_name }}"
8285 if [[ "$RUNNER_OS" == "Windows" ]]; then
8386 mv build/bangen.exe dist/"$NAME.exe"
84- (cd dist && zip "$NAME.zip" "$NAME.exe" && rm "$NAME.exe")
87+ powershell -Command "Compress-Archive -Path dist\\$NAME.exe -DestinationPath dist\\$NAME.zip"
88+ rm dist/"$NAME.exe"
8589 else
8690 mv build/bangen dist/"$NAME"
8791 (cd dist && tar -czf "$NAME.tar.gz" "$NAME" && rm "$NAME")
9195 with :
9296 name : ${{ matrix.name }}-build
9397 path : dist/*
98+ retention-days : 1
9499
95100 release :
96101 name : Publish Release
@@ -105,6 +110,11 @@ jobs:
105110 path : artifacts
106111 merge-multiple : true
107112
113+ - name : Generate checksums
114+ run : |
115+ cd artifacts
116+ sha256sum * > SHA256SUMS.txt
117+
108118 - uses : softprops/action-gh-release@v2
109119 with :
110120 tag_name : ${{ github.ref_name }}
0 commit comments