diff options
-rw-r--r-- | .github/workflows/ci-windows.yml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index bdf82230c..963261e93 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -2,6 +2,9 @@ name: Windows CI on: pull_request: push: + release: + types: + - published schedule: - cron: '0 0 * * 0' jobs: @@ -27,9 +30,17 @@ jobs: run: | mkdir ${{ github.workspace }}\build cd ${{ github.workspace }}\build - cmake -A "x64" -G "Visual Studio 16 2019" .. + cmake -A "x64" -D "CMAKE_BUILD_TYPE=${{ github.event_name == 'release' && 'Release' || 'Debug' }}" -G "Visual Studio 16 2019" .. - name: Build Anope working-directory: ${{ github.workspace }}\build run: | - msbuild PACKAGE.vcxproj /M:3 /P:Configuration=Release /P:Platform=x64 /VERBOSITY:MINIMAL + msbuild PACKAGE.vcxproj /M:3 /P:Configuration=${{ github.event_name == 'release' && 'Release' || 'Debug' }} /P:Platform=x64 /VERBOSITY:MINIMAL + + - name: Upload installer + if: "${{ github.event_name == 'release' }}" + working-directory: ${{ github.workspace }}\build + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe) |