From b5f5a4b0c2f9002413e640b260c53a2142507aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lower?= Date: Fri, 23 Feb 2024 07:32:07 +0100 Subject: [PATCH] Add CI/CD --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..943fb1a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: CMake on a single platform + +on: [push] + +#on: +# push: +# branches: ["master"] +# pull_request: +# branches: ["master"] + +permissions: + contents: write + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Configure CMake + run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target pacific_drive_plugin + + - name: Package + working-directory: ${{github.workspace}} + run: package.cmd + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: PenDriverPro-Win64-Shipping + path: ${{github.workspace}}/build/Release/profile/* + if-no-files-found: error + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: PenDriverPro-Win64-Shipping.zip