Skip to content

Commit 93dcca3

Browse files
Enhance CI with Nuitka caching and zip command update
Added caching for Nuitka and updated Windows zip command.
1 parent f492dbd commit 93dcca3

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

.github/workflows/release-binaries.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,16 @@ jobs:
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 \
@@ -81,7 +84,8 @@ jobs:
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")
@@ -91,6 +95,7 @@ jobs:
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

Comments
 (0)