Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cvega authored Oct 15, 2024
1 parent 6933394 commit 5634caf
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Large Release
name: Create Release with Multiple Large Files

on:
workflow_dispatch:
Expand All @@ -10,9 +10,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Create 50GB file
- name: Create 1GB file
run: |
dd if=/dev/zero of=large_file.bin bs=1M count=51200
dd if=/dev/zero of=large_file.bin bs=1M count=1024
- name: Get latest release
id: get_latest_release
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Increment release version
id: increment_version
run: |
CURRENT_VERSION=${{ steps.get_latest_release.outputs.result.tag_name }}
CURRENT_VERSION=${{ fromJson(steps.get_latest_release.outputs.result).tag_name }}
CURRENT_VERSION=${CURRENT_VERSION#v}
IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION"
((VERSION_PARTS[2]++))
Expand All @@ -50,12 +50,16 @@ jobs:
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
- name: Upload Release Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./large_file.bin
asset_name: large_file.bin
asset_content_type: application/octet-stream
run: |
for i in {1..50}
do
asset_name="large_file_${i}.bin"
curl -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary @"large_file.bin" \
"${{ steps.create_release.outputs.upload_url }}?name=$asset_name"
done

0 comments on commit 5634caf

Please sign in to comment.