From dc2f182aa4b5da5ed43d7ec4df1e36068dc92449 Mon Sep 17 00:00:00 2001 From: thezephyrsong <116720216+thezephyrsong@users.noreply.github.com> Date: Wed, 17 Jun 2026 01:45:41 +1000 Subject: [PATCH] Add GitHub Actions workflow for automated releases Introduce release.yml to automate build and release on tag push. Workflow sets up Windows environment, installs Qt via aqtinstall, builds with CMake, generates installer with CPack, and uploads it as a GitHub release asset. Qt installation updated to use msvc2022_64. --- .github/workflows/release.yml | 4 +- .../release.yml | 49 +++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 enc_temp_folder/5ff6254bcbd1b89a203971a6b14971c0/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76b7f4f..d8eded4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,8 +25,8 @@ jobs: run: | python -m pip install --upgrade pip pip install aqtinstall - python -m aqt install-qt windows desktop 6.8.3 win64_msvc2019_64 --outputdir ${{ github.workspace }}/Qt - echo "${{ github.workspace }}/Qt/6.8.3/msvc2019_64/bin" >> $GITHUB_PATH + python -m aqt install-qt windows desktop 6.8.3 win64_msvc2022_64 --outputdir ${{ github.workspace }}/Qt + echo "${{ github.workspace }}/Qt/6.8.3/msvc2022_64/bin" >> $GITHUB_PATH - name: Configure CMake run: | diff --git a/enc_temp_folder/5ff6254bcbd1b89a203971a6b14971c0/release.yml b/enc_temp_folder/5ff6254bcbd1b89a203971a6b14971c0/release.yml new file mode 100644 index 0000000..6e4b131 --- /dev/null +++ b/enc_temp_folder/5ff6254bcbd1b89a203971a6b14971c0/release.yml @@ -0,0 +1,49 @@ +name: Build and Release + +on: + push: + tags: + - 'v*' # Trigger this workflow whenever you push a tag starting with 'v' (like v1.0.0) + +jobs: + build-and-release: + runs-on: windows-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up MSVC (Visual Studio Compiler) + uses: ilammy/msvc-dev-cmd@v1 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install Qt via aqtinstall + run: | + python -m pip install --upgrade pip + pip install aqtinstall + python -m aqt install-qt windows desktop 6.8.3 win64_msvc2019 --outputdir ${{ github.workspace }}/Qt + echo "${{ github.workspace }}/Qt/6.8.3/msvc2019_64/bin" >> $GITHUB_PATH + + - name: Configure CMake + run: | + cmake -B build -S . -DCMAKE_BUILD_TYPE=Release + + - name: Build Project + run: | + cmake --build build --config Release + + - name: Run CPack (Generate Installer) + working-directory: build + run: | + cpack -C Release + + - name: Create GitHub Release and Upload Artifacts + uses: softprops/action-gh-release@v2 + with: + files: build/GitAddonsManager_Setup.exe # Path to where CPack spits out the installer + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}