Skip to content

Release: download tools bundle from tools pre-release for full installer #10

Release: download tools bundle from tools pre-release for full installer

Release: download tools bundle from tools pre-release for full installer #10

Workflow file for this run

name: Tests
on:
push:
pull_request:
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: Build tests
run: cmake --build build --target PacketTestBundleTests
- name: Run tests
id: run-tests
run: build\PacketTestBundleTests.exe | tee test_output.txt
- name: Write job summary
if: always()
shell: bash
run: |
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat test_output.txt >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: Build GUI
run: cmake --build build --target PacketTestBundle
- name: Upload GUI artifact
uses: actions/upload-artifact@v7
with:
name: PacketTestBundle
path: build\PacketTestBundle.exe
release:
needs: test
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build
- name: Download bundled tools
run: |
gh release download tools --pattern "tools-bundle.zip" --dir ..\
Expand-Archive -Path "..\tools-bundle.zip" -DestinationPath "..\"
gh release download tools --pattern "npcap-installer.exe" --dir .
env:
GH_TOKEN: ${{ github.token }}
- name: Build installer
run: |
choco install innosetup --no-progress -y
$version = "${{ github.ref_name }}" -replace '^v', ''
ISCC /DMyAppVersion=$version installer.iss
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
files: |
build\PacketTestBundle.exe
installer_out\*.exe
generate_release_notes: true