From 44e88518cffe14d650474ab59da89107c2c36e15 Mon Sep 17 00:00:00 2001 From: Sayan Nandan Date: Fri, 30 Apr 2021 18:09:11 +0530 Subject: [PATCH] Fix artifact packaging The upload-release-asset action only supports files and not entire dirs. I had expected it to zip an item if it were a directory; but I was wrong This commit zips everything before attempting to upload the artifacts --- .github/workflows/release.yml | 13 +++++++++---- ci/artifact.sh | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 ci/artifact.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89e62e99..f9c2b669 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,7 +83,7 @@ jobs: - name: Upload binaries uses: actions/upload-artifact@v2 with: - name: ${{ matrix.artifact }}.zip + name: ${{ matrix.artifact }} path: | target/release/skyd target/release/skysh @@ -93,7 +93,7 @@ jobs: - name: Upload binaries (Windows) uses: actions/upload-artifact@v2 with: - name: ${{ matrix.artifact }}.zip + name: ${{ matrix.artifact }} path: | target/release/skyd.exe target/release/skysh.exe @@ -172,7 +172,7 @@ jobs: - name: Upload binaries uses: actions/upload-artifact@v2 with: - name: ${{ matrix.artifact }}.zip + name: ${{ matrix.artifact }} path: | target/release/skyd target/release/skysh @@ -182,7 +182,7 @@ jobs: - name: Upload binaries (Windows) uses: actions/upload-artifact@v2 with: - name: ${{ matrix.artifact }}.zip + name: ${{ matrix.artifact }} path: | target/release/skyd.exe target/release/skysh.exe @@ -217,6 +217,11 @@ jobs: uses: actions/download-artifact@v2 with: path: artifacts + + - name: Archive artifacts + run: | + chmod +x ci/artifact.sh + bash ci/artifact.sh - name: Release Linux bundle (x86_64) uses: actions/upload-release-asset@v1 diff --git a/ci/artifact.sh b/ci/artifact.sh new file mode 100644 index 00000000..99ffaaee --- /dev/null +++ b/ci/artifact.sh @@ -0,0 +1,5 @@ +shopt -s dotglob +find * -prune -type d | while IFS= read -r d; do + echo "Zipping $d into $d.zip" + zip $d.zip -r $d +done