diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 48d879f..3b020dc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,40 +4,51 @@ on: [push] env: is_tag: ${{ startsWith(github.ref, 'refs/tags/') }} - + PROJECT_FILE_PATH: blur.sln BUILD_CONFIGURATION: Release BUILD_PLATFORM: x64 - + jobs: build: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Build - working-directory: ${{env.GITHUB_WORKSPACE}} - run: msbuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.PROJECT_FILE_PATH}} - - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: Blur - path: | - bin/blur-cli/Release/blur-cli.exe - bin/blur-gui/Release/blur.exe - - - name: Release - uses: softprops/action-gh-release@v1 - if: ${{ env.is_tag == 'true' }} - with: - files: | - bin/blur-cli/Release/blur-cli.exe - bin/blur-gui/Release/blur.exe - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Setup vcpkg + uses: lukka/run-vcpkg@v7 + with: + vcpkgDirectory: ${{ runner.workspace }}/vcpkg/ + vcpkgTriplet: '${{ env.BUILD_PLATFORM }}-windows-static' + vcpkgGitCommitId: '8eb57355a4ffb410a2e94c07b4dca2dffbee8e50' + vcpkgArguments: 'cxxopts fmt glfw3 imgui[opengl3-binding,glfw-binding] nlohmann-json' + + - name: Integrate vcpkg + run: ${{ runner.workspace }}\vcpkg\vcpkg integrate install + + - name: Build + working-directory: ${{ env.GITHUB_WORKSPACE }} + run: MSBuild /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.BUILD_PLATFORM }} ${{ env.PROJECT_FILE_PATH }} + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: Blur + path: | + bin/blur-cli/Release/blur-cli.exe + bin/blur-gui/Release/blur.exe + + - name: Release + uses: softprops/action-gh-release@v1 + if: ${{ env.is_tag == 'true' }} + with: + files: | + bin/blur-cli/Release/blur-cli.exe + bin/blur-gui/Release/blur.exe + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}