Skip to content

Commit

Permalink
Upload directory as an artifact instead of a zipfile to solve double …
Browse files Browse the repository at this point in the history
…zipping
  • Loading branch information
bit69tream committed Jan 13, 2024
1 parent 7c4ddae commit 83a3700
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ jobs:
cp -v ${{ env.PROJECT_NAME }}/README.md ${{ env.PROJECT_RELEASE_PATH }}
cp -v ${{ env.PROJECT_NAME }}/LICENSE ${{ env.PROJECT_RELEASE_PATH }}
ls ${{ env.PROJECT_RELEASE_PATH }}
7z a ./${{ env.PROJECT_RELEASE_PATH }}.zip ./${{ env.PROJECT_RELEASE_PATH }}
# 7z a ./${{ env.PROJECT_RELEASE_PATH }}.zip ./${{ env.PROJECT_RELEASE_PATH }}
# Issue: Double zip: https://github.com/actions/upload-artifact/issues/39
- name: Upload Artifacts
uses: actions/upload-artifact@v3
# with:
# name: ${{ env.PROJECT_RELEASE_PATH }}.zip
# path: ./${{ env.PROJECT_RELEASE_PATH }}.zip
with:
name: ${{ env.PROJECT_RELEASE_PATH }}.zip
path: ./${{ env.PROJECT_RELEASE_PATH }}.zip
name: ${{ env.PROJECT_RELEASE_PATH }}
path: ${{ env.PROJECT_RELEASE_PATH }}

# Alternative: https://github.com/marketplace/actions/gh-release
- name: Upload Artifact to Release
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/webassembly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,18 @@ jobs:
cp -v ${{ env.PROJECT_NAME }}/README.md ${{ env.PROJECT_RELEASE_PATH }}/README.md
cp -v ${{ env.PROJECT_NAME }}/LICENSE ${{ env.PROJECT_RELEASE_PATH }}/LICENSE
ls ${{ env.PROJECT_RELEASE_PATH }}
7z a -tzip -r ${{ env.PROJECT_RELEASE_PATH }}.zip ./${{ env.PROJECT_RELEASE_PATH }}
# 7z a -tzip -r ${{ env.PROJECT_RELEASE_PATH }}.zip ./${{ env.PROJECT_RELEASE_PATH }}
shell: bash

# Issue: Double zip: https://github.com/actions/upload-artifact/issues/39
- name: Upload Artifacts
uses: actions/upload-artifact@v3
# with:
# name: ${{ env.PROJECT_RELEASE_PATH }}.zip
# path: ./${{ env.PROJECT_RELEASE_PATH }}.zip
with:
name: ${{ env.PROJECT_RELEASE_PATH }}.zip
path: ./${{ env.PROJECT_RELEASE_PATH }}.zip
name: ${{ env.PROJECT_RELEASE_PATH }}
path: ${{ env.PROJECT_RELEASE_PATH }}

# Alternative: https://github.com/marketplace/actions/gh-release
- name: Upload Artifact to Release
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@ jobs:
cp -v ${{ env.PROJECT_NAME }}/README.md ${{ env.PROJECT_RELEASE_PATH }}
cp -v ${{ env.PROJECT_NAME }}/LICENSE ${{ env.PROJECT_RELEASE_PATH }}
ls ${{ env.PROJECT_RELEASE_PATH }}
7z a ./${{ env.PROJECT_RELEASE_PATH }}.zip ./${{ env.PROJECT_RELEASE_PATH }}
# 7z a ./${{ env.PROJECT_RELEASE_PATH }}.zip ./${{ env.PROJECT_RELEASE_PATH }}
# Issue: Double zip: https://github.com/actions/upload-artifact/issues/39
- name: Upload Artifacts
uses: actions/upload-artifact@v3
# with:
# name: ${{ env.PROJECT_RELEASE_PATH }}.zip
# path: ./${{ env.PROJECT_RELEASE_PATH }}.zip
with:
name: ${{ env.PROJECT_RELEASE_PATH }}.zip
path: ./${{ env.PROJECT_RELEASE_PATH }}.zip
name: ${{ env.PROJECT_RELEASE_PATH }}
path: ./${{ env.PROJECT_RELEASE_PATH }}

# Alternative: https://github.com/marketplace/actions/gh-release
- name: Upload Artifact to Release
Expand Down

0 comments on commit 83a3700

Please sign in to comment.