From 743499e8cde96d7e2ed27aa4ffbbfbcaba666de0 Mon Sep 17 00:00:00 2001 From: Knightmare Date: Thu, 9 Apr 2026 18:51:30 +0100 Subject: [PATCH 1/9] Update pr.yml --- .github/workflows/pr.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ae1564a..9f73c53 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,23 +1,25 @@ name: NTop PR CI -# Trigger on every master branch push and pull request on: pull_request: branches: - master - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: build: runs-on: windows-latest + strategy: + matrix: + arch: [x64, ARM64] + steps: - name: Checkout uses: actions/checkout@v2 - - name: Run CMake - run: cmake -DCMAKE_BUILD_TYPE=Release . + - name: Configure CMake + run: cmake -A ${{ matrix.arch }} -DCMAKE_BUILD_TYPE=Release . - - name: Run Build + - name: Build run: cmake --build . --config Release From b1b1012fa63cede04e7239e530f75c00322873cc Mon Sep 17 00:00:00 2001 From: Knightmare Date: Thu, 9 Apr 2026 18:58:14 +0100 Subject: [PATCH 2/9] Update pr.yml --- .github/workflows/pr.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9f73c53..49e65d5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,7 +19,13 @@ jobs: uses: actions/checkout@v2 - name: Configure CMake - run: cmake -A ${{ matrix.arch }} -DCMAKE_BUILD_TYPE=Release . + run: cmake -A ${{ matrix.arch }} -B build-${{ matrix.arch }} -DCMAKE_BUILD_TYPE=Release . - name: Build - run: cmake --build . --config Release + run: cmake --build build-${{ matrix.arch }} --config Release + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ntop-${{ matrix.arch }} + path: build-${{ matrix.arch }}/Release/ From 894b4db25696511e37d45dc0f16397e23ce3768f Mon Sep 17 00:00:00 2001 From: Knightmare Date: Thu, 9 Apr 2026 18:58:36 +0100 Subject: [PATCH 3/9] Update ci.yml --- .github/workflows/ci.yml | 49 ++++++++++++---------------------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6210ed2..49e65d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,52 +1,31 @@ -name: NTop CI +name: NTop PR CI -# Trigger on every master branch push and pull request on: - push: + pull_request: branches: - master - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: build: runs-on: windows-latest + strategy: + matrix: + arch: [x64, ARM64] + steps: - name: Checkout uses: actions/checkout@v2 - - name: Run CMake - run: cmake -DCMAKE_BUILD_TYPE=Release . - - - name: Run Build - run: cmake --build . --config Release + - name: Configure CMake + run: cmake -A ${{ matrix.arch }} -B build-${{ matrix.arch }} -DCMAKE_BUILD_TYPE=Release . - - name: Set version - id: set_version - run: echo "VERSION=v0.3.$((${{ github.run_number }} + 4))" >> $GITHUB_ENV - shell: bash - - - name: create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ env.VERSION }} - release_name: ${{ env.VERSION }} - body: | - ${{ github.event.head_commit.message }} - draft: false - prerelease: false + - name: Build + run: cmake --build build-${{ matrix.arch }} --config Release - - name: Upload release asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload artifact + uses: actions/upload-artifact@v4 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: .\Release\NTop.exe - asset_name: NTop.exe - asset_content_type: application/vnd.microsoft.portable-executable + name: ntop-${{ matrix.arch }} + path: build-${{ matrix.arch }}/Release/ From 1507fda5431b0c8b969840708af282b1d0cafc65 Mon Sep 17 00:00:00 2001 From: Knightmare Date: Thu, 9 Apr 2026 19:02:05 +0100 Subject: [PATCH 4/9] Update ci.yml From da010858cd1c45f26288925d09082fa759b0719c Mon Sep 17 00:00:00 2001 From: Knightmare Date: Thu, 9 Apr 2026 19:02:31 +0100 Subject: [PATCH 5/9] Create release.yml --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a29e761 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Create release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref_name }} + release_name: ${{ github.ref_name }} From 5a5b2fad5be43fa175476ba9d7979620f739ce25 Mon Sep 17 00:00:00 2001 From: Knightmare Date: Thu, 9 Apr 2026 19:08:31 +0100 Subject: [PATCH 6/9] Update ci.yml --- .github/workflows/ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49e65d5..8c09825 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,8 @@ -name: NTop PR CI +name: CI Build on: pull_request: - branches: - - master + branches: [master] workflow_dispatch: jobs: @@ -16,7 +15,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Configure CMake run: cmake -A ${{ matrix.arch }} -B build-${{ matrix.arch }} -DCMAKE_BUILD_TYPE=Release . @@ -24,8 +23,12 @@ jobs: - name: Build run: cmake --build build-${{ matrix.arch }} --config Release + - name: Package output (ZIP) + run: | + powershell -Command "Compress-Archive -Path build-${{ matrix.arch }}/Release/* -DestinationPath ntop-${{ matrix.arch }}.zip" + - name: Upload artifact uses: actions/upload-artifact@v4 with: name: ntop-${{ matrix.arch }} - path: build-${{ matrix.arch }}/Release/ + path: ntop-${{ matrix.arch }}.zip From dfc4e3a7d94d1e0ad3d4d125542ff9036e4172bc Mon Sep 17 00:00:00 2001 From: Knightmare Date: Thu, 9 Apr 2026 19:09:48 +0100 Subject: [PATCH 7/9] Delete .github/workflows/release.yml --- .github/workflows/release.yml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index a29e761..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: release - -on: - push: - tags: - - "v*" - -permissions: - contents: write - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - name: Create release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref_name }} - release_name: ${{ github.ref_name }} From 8ec81e81215769e59912ebbd104fc867c91ae68e Mon Sep 17 00:00:00 2001 From: Knightmare Date: Thu, 9 Apr 2026 19:10:16 +0100 Subject: [PATCH 8/9] Create build-and-release.yml --- .github/workflows/build-and-release.yml | 53 +++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/build-and-release.yml diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml new file mode 100644 index 0000000..3c5806d --- /dev/null +++ b/.github/workflows/build-and-release.yml @@ -0,0 +1,53 @@ +name: Build and Release + +on: + pull_request: + branches: [master] + + push: + tags: + - "v*" + + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: windows-latest + + strategy: + matrix: + arch: [x64, ARM64] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure CMake + run: cmake -A ${{ matrix.arch }} -B build-${{ matrix.arch }} . + + - name: Build + run: cmake --build build-${{ matrix.arch }} --config Release + + - name: Package (ZIP) + shell: pwsh + run: | + Compress-Archive ` + -Path build-${{ matrix.arch }}/Release/* ` + -DestinationPath ntop-${{ matrix.arch }}.zip + + - name: Upload build artifact (for debugging) + uses: actions/upload-artifact@v4 + with: + name: ntop-${{ matrix.arch }} + path: ntop-${{ matrix.arch }}.zip + + - name: Upload release assets (only on tags) + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + files: ntop-${{ matrix.arch }}.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 98c9061af2005d3815b0b042e90c5c71cc57d1e1 Mon Sep 17 00:00:00 2001 From: Knightmare Date: Sun, 7 Jun 2026 11:30:35 +0100 Subject: [PATCH 9/9] Update build-and-release.yml --- .github/workflows/build-and-release.yml | 80 ++++++++++++++++++------- 1 file changed, 60 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 3c5806d..4d38583 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -1,53 +1,93 @@ name: Build and Release on: - pull_request: - branches: [master] - - push: - tags: - - "v*" - workflow_dispatch: permissions: contents: write +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + jobs: build: - runs-on: windows-latest + runs-on: windows-2025 strategy: matrix: - arch: [x64, ARM64] + arch: [Win32, x64, ARM64] steps: + # 1️⃣ Checkout source - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 + # 2️⃣ Configure CMake - name: Configure CMake - run: cmake -A ${{ matrix.arch }} -B build-${{ matrix.arch }} . + shell: pwsh + run: | + cmake -S . -B build-${{ matrix.arch }} -A ${{ matrix.arch }} + # 3️⃣ Build - name: Build - run: cmake --build build-${{ matrix.arch }} --config Release + shell: pwsh + run: | + cmake --build build-${{ matrix.arch }} --config Release - - name: Package (ZIP) + # 4️⃣ Package (ZIP) + - name: Package shell: pwsh run: | + $out = "ntop-${{ matrix.arch }}.zip" + + if (Test-Path $out) { + Remove-Item $out -Force + } + Compress-Archive ` - -Path build-${{ matrix.arch }}/Release/* ` - -DestinationPath ntop-${{ matrix.arch }}.zip + -Path "build-${{ matrix.arch }}\Release\*" ` + -DestinationPath $out - - name: Upload build artifact (for debugging) - uses: actions/upload-artifact@v4 + # 5️⃣ Upload artifact + - name: Upload artifact + uses: actions/upload-artifact@v5 with: name: ntop-${{ matrix.arch }} path: ntop-${{ matrix.arch }}.zip + if-no-files-found: error - - name: Upload release assets (only on tags) - if: startsWith(github.ref, 'refs/tags/') + + release: + runs-on: windows-2025 + needs: build + + steps: + # 1️⃣ Checkout (required for release action metadata) + - name: Checkout + uses: actions/checkout@v5 + + # 2️⃣ Download artifacts + - name: Download artifacts + uses: actions/download-artifact@v5 + with: + path: ./artifacts + merge-multiple: true + + # 3️⃣ Create GitHub Release + upload assets + - name: Release uses: softprops/action-gh-release@v2 with: - files: ntop-${{ matrix.arch }}.zip + tag_name: v1.0.${{ github.run_number }} + name: Build v1.0.${{ github.run_number }} + body: | + Manual build release: + - Windows x86 (Win32) + - Windows x64 + - Windows ARM64 + + files: | + ./artifacts/ntop-Win32.zip + ./artifacts/ntop-x64.zip + ./artifacts/ntop-ARM64.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}