Release workflow #114
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 C3 (MSVC) | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| name: Build C3 (MSVC) | |
| strategy: | |
| matrix: | |
| configuration: [Release] | |
| # configuration: [Debug, ReleaseWithDebInfo, Release] | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Setup .NET Core 3.1 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '3.1.x' | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Dotnet restore | |
| run: msbuild Src/C3.sln "/t:restore" | |
| - name: Build MSVC x86 | |
| run: msbuild Src/C3.sln /p:Platform=x86 /p:Configuration=${{ matrix.configuration }} "/t:GatewayConsoleExe;NodeRelayConsoleExe;NodeRelayDll;CebuLoader;ChannelLinter" | |
| - name: Build MSVC x64 | |
| run: msbuild Src/C3.sln /p:Platform=x64 /p:Configuration=${{ matrix.configuration }} "/t:GatewayConsoleExe;NodeRelayConsoleExe;NodeRelayDll;CebuLoader;ChannelLinter" | |
| - name: Build WebService | |
| run: dotnet publish -p:Platform=any -c ${{ matrix.configuration }} Src/WebController/Backend -o Bin/WebController | |
| # - name: Prepare Build Output Structure | |
| # run: | | |
| # mkdir Build | |
| # | |
| # copy StartWebController.cmd Build\StartWebController.cmd | |
| # copy RestartWebController.cmd Build\RestartWebController.cmd | |
| # copy Res\GatewayConfiguration.json Build\Bin\GatewayConfiguration.json | |
| # Move-Item Bin\WebController Build\WebController | |
| # Move-Item Bin Build\Bin | |
| # Get-ChildItem -Path Build\Bin -Include *.exp,*.lib,*.map -Recurse | Remove-Item -Force | |
| # | |
| # - name: Set artifact name | |
| # id: artifact_name | |
| # run: | | |
| # if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| # echo "name=C3-pr-${{ github.event.pull_request.number }}-${{ github.sha }}" >> $GITHUB_OUTPUT | |
| # elif [ "${{ github.ref_type }}" = "tag" ]; then | |
| # echo "name=C3-${{ github.ref_name }}-Release" >> $GITHUB_OUTPUT | |
| # else | |
| # echo "name=C3-${{ github.run_number }}-Release" >> $GITHUB_OUTPUT | |
| # fi | |
| # shell: bash | |
| # | |
| # - name: Upload Release Artifacts | |
| # if: matrix.configuration == 'Release' | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ${{ steps.artifact_name.outputs.name }} | |
| # path: Build/** |