trigger CI builds on push to main #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Windows | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| inputs: | |
| build_type: | |
| description: 'Build type' | |
| required: true | |
| default: 'Release' | |
| type: choice | |
| options: | |
| - Release | |
| - Debug | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x86 | |
| - name: Configure CMake | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=${{ inputs.build_type || 'Release' }} | |
| - name: Build | |
| run: | | |
| cd build | |
| cmake --build . --target nextclientapi_amxx | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nextclientapi_amxx-windows-${{ inputs.build_type || 'Release' }} | |
| path: build/nextclientapi_amxx.dll | |
| if-no-files-found: error |