Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
Alek Petuskey authored and Alek Petuskey committed Jun 20, 2024
1 parent d4365c0 commit 24d9eea
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/create-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@ jobs:
for dir in */ ; do
zip -r "${dir%/}.zip" "$dir"
done
ls *.zip > zipfiles.txt
- name: Upload artifacts
- name: Prepare artifact list
id: prepare
run: |
for file in *.zip; do
name=$(basename "$file" .zip)
echo "Uploading $file as $name"
gh run upload-artifact --name "$name" "$file"
done
files=$(cat zipfiles.txt)
echo "files=$files" >> $GITHUB_ENV
upload-individual:
needs: zip-and-upload
runs-on: ubuntu-latest
strategy:
matrix:
file: ${{ fromJson(env.files.split('\n')) }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.file }}
path: ${{ matrix.file }}
if-no-files-found: "warn"
retention-days: 90
compression-level: 6
overwrite: true

0 comments on commit 24d9eea

Please sign in to comment.