dev #83
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: dev | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'pipelines/**' | |
| - '.github/**' | |
| workflow_dispatch: | |
| inputs: | |
| publishPackages: | |
| description: 'Set to "true" if packages should be published (runs the Release build); otherwise, leave as "false"' | |
| required: false | |
| default: 'false' | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| configuration: [Release] | |
| runs-on: self-hosted | |
| timeout-minutes: 240 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| path: '.' | |
| fetch-depth: 0 | |
| - name: Build Test Package | |
| if: ${{ github.event.inputs.publishPackages != 'true' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GH_USER: ${{ secrets.GH_USER }} | |
| run: > | |
| .\pipelines\runbuild.ps1 -properties @{ | |
| "buildConfig" = "Release"; | |
| "updateAssemblyInfo" = $true; | |
| "testingStrength" = 1; | |
| "isTestingEnabled" = $true; | |
| "packNugets" = $false; | |
| "publishNugets" = $false; | |
| } | |
| - name: Build Test Package Release | |
| if: ${{ github.event.inputs.publishPackages == 'true' }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GH_USER: ${{ secrets.GH_USER }} | |
| NUGET_TCOPEN : ${{ secrets.NUGET_TCOPEN }} | |
| run: > | |
| .\pipelines\runbuild.ps1 -properties @{ | |
| "buildConfig" = "Release"; | |
| "updateAssemblyInfo" = $true; | |
| "testingStrength" = 10; | |
| "isTestingEnabled" = $true; | |
| "packNugets" = $true; | |
| "publishNugets" = $true; | |
| "nugetToken" = "$env:NUGET_TCOPEN"; | |
| "nugetSource" = "https://api.nuget.org/v3/index.json"; | |
| } | |
| - name: Cake-Draft-Release | |
| if: ${{ github.event.inputs.publishPackages == 'true' }} | |
| env: | |
| NUGET_TCOPEN: ${{ secrets.NUGET_TCOPEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: > | |
| .\pipelines\release-to-gh.ps1 | |
| - name: Create Tag | |
| if: ${{ env.BuildNumber && success() && github.event_name != 'pull_request' }} | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "InxtonDev" | |
| $tag = "GH-${{ github.run_id }}-${{ env.BuildNumber }}" | |
| git tag $tag | |
| git push --tags | |
| continue-on-error: true | |
| # - name: Test Report | |
| # uses: dorny/test-reporter@v1 | |
| # if: success() || failure() | |
| # with: | |
| # name: Test report | |
| # path: '**/TestResults/*.xml' | |
| # reporter: dotnet-trx | |
| # | |
| # - name: Upload PLC libraries | |
| # uses: actions/upload-artifact@v4 | |
| # if: success() | |
| # with: | |
| # name: plcLibs | |
| # path: ${{ github.workspace }}\plcLibs\*.library |