Skip to content

Commit

Permalink
feat: add 7-Zip compression with password protection for kernels arti…
Browse files Browse the repository at this point in the history
…fact

- Added setup for 7-Zip using milliewalky/setup-7-zip@v1
- Implemented conditional step to re-zip kernels with high compression and password protection if ARCHIVE_PASSWORD secret is set
- Updated artifact upload to use the new kernels.7z file
- Added cleanup steps to remove temporary files and directories
  • Loading branch information
maxisoft committed Jul 27, 2024
1 parent 44f8148 commit c801128
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/doit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,28 @@ jobs:
run: |
python main.py
- uses: milliewalky/setup-7-zip@v1

- name: ReZip kernels
if: ${{ github.actor == github.repository_owner && secrets.ARCHIVE_PASSWORD }}
run: |
mkdir -p tmp
7z x kernels.zip -otmp
7z a -t7z -mx=9 -p"${{ secrets.ARCHIVE_PASSWORD }}" kernels.7z tmp/*
- name: Cleanup
if: ${{ always() }}
run: |
rm -rf tmp || :
rm -rf kernels.zip || :
exit 0
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: kernels
path: kernels.zip
path: kernels.7z
if-no-files-found: error
retention-days: 90

0 comments on commit c801128

Please sign in to comment.