From 28fd12e2124b0e10629524bd1427203a74a0dc61 Mon Sep 17 00:00:00 2001 From: vgmoose Date: Sun, 23 Jul 2023 12:49:59 -0400 Subject: [PATCH] Add multiplatform CI Builds (#1) * ci: use default shell * ci: artifact zipping, windows changes * ci: use right folder for artifacts * ci: fix windows deploy * ci: windows: use release folder * ci: add zip for windows * ci: adjust release bundles --- .github/workflows/main.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 28acdda..f3cae3f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - ci-release pull_request: branches: - main @@ -19,6 +20,25 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v3 - uses: ilammy/msvc-dev-cmd@v1 - - name: Build ${{ matrix.platform }} + - name: Build for ${{ matrix.os }} shell: bash - run: cd CaptiveDNS && qmake && make \ No newline at end of file + run: cd CaptiveDNS && qmake && (make || nmake || (rm /usr/bin/link && nmake)) + - name: Bundle for ${{ matrix.os }} + shell: bash + run: | + if [[ "${{ matrix.os }}" == "macos" ]]; then + zip -r ./CaptiveDNS-${{ matrix.os }}.zip ./CaptiveDNS/CaptiveDNS.app + elif [[ "${{ matrix.os }}" == "windows" ]]; then + mkdir -p ./CaptiveDNS/CaptiveDNS + cp ./CaptiveDNS/release/CaptiveDNS.exe ./CaptiveDNS/CaptiveDNS + windeployqt ./CaptiveDNS/CaptiveDNS/CaptiveDNS.exe + choco install -y zip + cd ./CaptiveDNS/CaptiveDNS/ + zip -r ../../CaptiveDNS-${{ matrix.os }}.zip . + else + zip -r ./CaptiveDNS-${{ matrix.os }}.zip ./CaptiveDNS/CaptiveDNS + fi + - uses: actions/upload-artifact@v3 + with: + name: CaptiveDNS-${{ matrix.os }} + path: ./CaptiveDNS-${{ matrix.os }}.zip \ No newline at end of file