From 50a98af8588502e7692bcc499316bab021155377 Mon Sep 17 00:00:00 2001 From: Yaksh Bariya Date: Wed, 30 Mar 2022 08:20:03 +0530 Subject: [PATCH] CI: Upload build artifacts even on build failure Helpful when CI times out or building a large number of packages for testing and it fails --- .github/workflows/packages.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index c7b24925b..0bc8145c9 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -137,6 +137,9 @@ jobs: ./scripts/run-docker.sh ./build-package.sh -I -a ${{ matrix.target_arch }} $(cat ./built_packages.txt) fi + - name: Generate build artifacts + if: always() + run: | mkdir -p debs test -d termux-packages/output && mv termux-packages/output/* ./output/ @@ -158,9 +161,11 @@ jobs: # Archiving *.deb files in a tarball to avoid issues with uploading. tar cf artifacts/debs-${{ matrix.target_arch }}-${{ github.sha }}.tar debs - name: Checksums for built *.deb files + if: always() run: | find debs -type f -name "*.deb" -exec sha256sum "{}" \; | sort -k2 - name: Store *.deb files + if: always() uses: actions/upload-artifact@v2 with: name: termux-packages-${{ matrix.target_arch }}-${{ github.sha }}