Skip to content

Commit

Permalink
Split large archives
Browse files Browse the repository at this point in the history
Github releas artifacts have a file size limit of
2GiB, so we need to split larger archives.
  • Loading branch information
jschwe committed Oct 6, 2024
1 parent 3b718a4 commit 72b4b6f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ jobs:
with:
merge-multiple: true
path: ./artifacts
# Files attached to GitHub releases have a size limit of 2GiB
- name: Split large files
env:
GH_TOKEN: ${{ github.token }}
working-directory: artifacts
# Note: will not work on macos, but we can run the release job on ubuntu only.
run: |
MAX_ARCHIVE_SIZE=2147483648
for archive in ./*.tar.gz; do
archive_size=$(stat -c%s "${archive}")
if (( archive_size >= MAX_ARCHIVE_SIZE )); then
split -b 2GB "${archive}" "${archive}."
rm "${archive}"
fi
done
- name: Publish release
id: publish-release
env:
Expand Down

0 comments on commit 72b4b6f

Please sign in to comment.