OpenRia Build #299
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: OpenRia Build | |
| env: | |
| NEXT_RELEASE_VERSION: '3.4.0' | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| opensilver-version: | |
| description: 'OpenSilver version' | |
| required: true | |
| version: | |
| description: 'OpenSilver.OpenRiaServices.* packages version' | |
| required: false | |
| default: '' | |
| publish-myget: | |
| description: 'Publish to MyGet.org' | |
| required: false | |
| type: boolean | |
| default: true | |
| publish-myget-rc: | |
| description: 'Publish to MyGet.org RC feed' | |
| required: false | |
| type: boolean | |
| default: false | |
| publish-nuget-org: | |
| description: 'Publish to NuGet.org' | |
| required: false | |
| type: boolean | |
| default: false | |
| jobs: | |
| OpenRia-Build: | |
| if: github.repository_owner == 'OpenSilver' | |
| runs-on: windows-latest | |
| steps: | |
| - uses: microsoft/[email protected] | |
| - name: Inject slug/short variables | |
| uses: rlespinasse/[email protected] | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.x' | |
| dotnet-quality: 'ga' | |
| - name: Clone OpenRiaServices repo | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: Format Package Version | |
| id: version | |
| shell: pwsh | |
| run: | | |
| $v = "${{ github.event.inputs.version }}" | |
| if ([string]::IsNullOrWhiteSpace($v)) | |
| { | |
| $timestamp = Get-Date -Format "yyyy-MM-dd-HHmmss" | |
| $v = "$env:NEXT_RELEASE_VERSION-preview-$timestamp-$env:GITHUB_SHA_SHORT" | |
| } | |
| "value=$v" >> $env:GITHUB_OUTPUT | |
| - name: Build OpenRiaServices.OpenSilver.sln | |
| run: | | |
| msbuild OpenRiaServices.OpenSilver.sln -p:Configuration=Release -p:OpenSilverPackageVersion=${{ github.event.inputs.opensilver-version }} -clp:ErrorsOnly -restore | |
| - name: Pack packages | |
| working-directory: OpenRiaServices.NuGet | |
| run: | | |
| .\Pack-Client-OS.ps1 -Version ${{ steps.version.outputs.value }} -OpenSilverDependencyVersion ${{ github.event.inputs.opensilver-version }} -RepositoryUrl https://github.com/${{ env.GITHUB_REPOSITORY_OWNER_PART }}/${{ env.GITHUB_REPOSITORY_NAME_PART }} | |
| - name: Upload packages | |
| run: | | |
| dotnet nuget push "OpenRiaServices.NuGet\bin\opensilver\*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ env.GITHUB_REPOSITORY_OWNER_PART }}/index.json | |
| - name: Upload packages to MyGet | |
| if: ${{ inputs['publish-myget'] }} | |
| run: | | |
| dotnet nuget push "OpenRiaServices.NuGet\bin\opensilver\*.nupkg" -k ${{ secrets.MYGET_TOKEN }} -s https://www.myget.org/F/opensilver/api/v2/package | |
| - name: Upload packages to MyGet RC feed | |
| if: ${{ inputs['publish-myget-rc'] }} | |
| run: | | |
| dotnet nuget push "OpenRiaServices.NuGet\bin\opensilver\*.nupkg" -k ${{ secrets.MYGET_RC_TOKEN }} -s ${{ secrets.MYGET_RC_FEED }} | |
| - name: Upload packages to NuGet.org | |
| if: ${{ inputs['publish-nuget-org'] }} | |
| run: | | |
| dotnet nuget push "OpenRiaServices.NuGet\bin\opensilver\*.nupkg" -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: OpenRia4.6 | |
| path: "OpenRiaServices.NuGet/bin/OpenSilver" |