From a4503553d92eb00e692619680c1f11ba31b2eb84 Mon Sep 17 00:00:00 2001 From: Ash Manning Date: Fri, 15 Mar 2024 18:30:57 +0800 Subject: [PATCH] Zip files before uploading to releases.drivechain.info --- .github/workflows/build.yml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87ae36fde..824f3dd3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,9 @@ jobs: MAINCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure) echo "MAINCHAIN_VERSION=$MAINCHAIN_VERSION" >> "$GITHUB_ENV" + - name: move qt binary before uploading artifacts + run: mv src/qt/drivechain-qt src/drivechain-qt + - uses: actions/upload-artifact@v4 with: name: mainchain-${{ env.MAINCHAIN_VERSION }}-x86_64-unknown-linux-gnu @@ -49,7 +52,7 @@ jobs: path: | src/drivechaind src/drivechain-cli - src/qt/drivechain-qt + src/drivechain-qt build-windows: @@ -98,6 +101,9 @@ jobs: MAINCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure) echo "MAINCHAIN_VERSION=$MAINCHAIN_VERSION" >> "$GITHUB_ENV" + - name: move qt binary before uploading artifacts + run: mv src/qt/drivechain-qt.exe src/drivechain-qt.exe + - uses: actions/upload-artifact@v4 with: name: mainchain-${{ env.MAINCHAIN_VERSION }}-x86_64-w64-mingw32 @@ -105,7 +111,7 @@ jobs: path: | src/drivechaind.exe src/drivechain-cli.exe - src/qt/drivechain-qt.exe + src/drivechain-qt.exe build-macos: name: Build macOS binaries @@ -142,6 +148,9 @@ jobs: MAINCHAIN_VERSION=$(grep -oP "(?<=^PACKAGE_VERSION=').+(?='$)" configure) echo "MAINCHAIN_VERSION=$MAINCHAIN_VERSION" >> "$GITHUB_ENV" + - name: move qt binary before uploading artifacts + run: mv src/qt/drivechain-qt src/drivechain-qt + - uses: actions/upload-artifact@v4 with: name: mainchain-${{ env.MAINCHAIN_VERSION }}-x86_64-apple-darwin11 @@ -149,16 +158,26 @@ jobs: path: | src/drivechaind src/drivechain-cli - src/qt/drivechain-qt + src/drivechain-qt upload-artifacts-to-releases-drivechain-info: name: Upload artifacts to releases.drivechain.info runs-on: ubuntu-latest needs: [build-linux, build-macos, build-windows] + if: github.repository_owner == 'LayerTwo-Labs' steps: - name: Download artifacts uses: actions/download-artifact@v4 + - name: Zip artifacts + run: | + mv mainchain-*-x86_64-apple-darwin11 L1-Mainchain-latest-x86_64-apple-darwin + zip -r L1-Mainchain-latest-x86_64-apple-darwin.zip L1-Mainchain-latest-x86_64-apple-darwin + mv mainchain-*-x86_64-w64-mingw32 L1-Mainchain-latest-x86_64-w64-mingw32 + zip -r L1-Mainchain-latest-x86_64-w64-mingw32.zip L1-Mainchain-latest-x86_64-w64-mingw32 + mv mainchain-*-x86_64-unknown-linux-gnu L1-Mainchain-latest-x86_64-unknown-linux-gnu + zip -r L1-Mainchain-latest-x86_64-unknown-linux-gnu.zip L1-Mainchain-latest-x86_64-unknown-linux-gnu + - name: Upload artifacts to releases.drivechain.info uses: cross-the-world/ssh-scp-ssh-pipelines@latest with: @@ -167,6 +186,4 @@ jobs: pass: ${{ secrets.RELEASES_SERVER_PW }} port: 22 scp: | - 'mainchain-*-x86_64-apple-darwin11' => '/var/www/html/L1-Mainchain-latest-x86_64-apple-darwin' - 'mainchain-*-x86_64-w64-mingw32' => '/var/www/html/L1-Mainchain-latest-x86_64-w64-mingw32' - 'mainchain-*-x86_64-unknown-linux-gnu' => '/var/www/html/L1-Mainchain-latest-x86_64-unknown-linux-gnu' + 'L1-Mainchain-latest-*.zip' => '/var/www/html/' \ No newline at end of file