Add GitHub Actions workflow for build and release
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
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: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: '6.x.x' # Match your specific Qt version here
|
||||
|
||||
- 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 }}
|
||||
Reference in New Issue
Block a user