From ddf3ef1389e9f7c056e77ef808d6a746b8adbfc9 Mon Sep 17 00:00:00 2001 From: nullptrdevs <16590917+nullptrdevs@users.noreply.github.com> Date: Wed, 7 Dec 2022 17:12:27 -0800 Subject: [PATCH] main ci: upload an artifact per arch (#809) * main ci: upload an artifact per arch * main ci: do deploy only if 'zigtools' is the owner --- .github/workflows/main.yml | 56 ++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0607ced..4f9a76e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,21 +53,59 @@ jobs: fi sed -e '1,5d' < README.md > artifacts/${target}/README.md cp LICENSE artifacts/${target}/ - cd artifacts/${target}/ - tar cfa ${target}.tar.zst *.md bin/* - mv ${target}.tar.zst ../ - cd ../.. done - - name: Upload artifacts + - name: Upload x86_64-windows artifact if: ${{ matrix.os == 'ubuntu-latest' }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: builds - path: artifacts/*.tar.zst + name: zls-x86_64-windows + path: artifacts/x86_64-windows/ + + - name: Upload x86_64-linux artifact + if: ${{ matrix.os == 'ubuntu-latest' }} + uses: actions/upload-artifact@v3 + with: + name: zls-x86_64-linux + path: artifacts/x86_64-linux/ + + - name: Upload x86_64-macos artifact + if: ${{ matrix.os == 'ubuntu-latest' }} + uses: actions/upload-artifact@v3 + with: + name: zls-x86_64-macos + path: artifacts/x86_64-macos/ + + - name: Upload x86-windows artifact + if: ${{ matrix.os == 'ubuntu-latest' }} + uses: actions/upload-artifact@v3 + with: + name: zls-x86-windows + path: artifacts/x86-windows/ + + - name: Upload x86-linux artifact + if: ${{ matrix.os == 'ubuntu-latest' }} + uses: actions/upload-artifact@v3 + with: + name: zls-x86-linux + path: artifacts/x86-linux/ + + - name: Upload aarch64-linux artifact + if: ${{ matrix.os == 'ubuntu-latest' }} + uses: actions/upload-artifact@v3 + with: + name: zls-aarch64-linux + path: artifacts/aarch64-linux/ + + - name: Upload aarch64-macos artifact + if: ${{ matrix.os == 'ubuntu-latest' }} + uses: actions/upload-artifact@v3 + with: + name: zls-aarch64-macos + path: artifacts/aarch64-macos/ - name: Beam to Felix - if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' }} + if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' && github.repository_owner == 'zigtools' }} uses: easingthemes/ssh-deploy@v2.1.1 env: SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_PRIVKEY }}