Set version to '1.33' #321
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
- release/** | |
env: | |
UnoCheck_Version: '1.27.2' | |
jobs: | |
build: | |
name: Build | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: dotnet/nbgv@f088059084cb5d872e9d1a994433ca6440c2bf72 # v0.4.2 | |
with: | |
toolVersion: 3.6.139 | |
setAllVars: true | |
- run: | | |
npm install -g [email protected] | |
conventional-changelog -p angular -u -r 1 -o "build/changelog.md" | |
name: 'Generate changelog.md' | |
- run: | | |
& dotnet tool update --global uno.check --version ${{ env.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json | |
& uno-check -v --ci --non-interactive --fix --skip xcode --skip androidemulator --skip gtk3 --skip vswin --skip vsmac | |
name: Install .NET Workloads | |
- name: Adjust msbuild task name | |
run: | | |
cd src | |
gci -r -File -Include *.cs,*.targets,*.props,*.csproj | foreach-object { $a = $_.fullname; ( get-content $a ) | foreach-object { $_ -replace "v0","$env:NBGV_GitCommitId" } | set-content $a } | |
- name: Build - CI | |
run: | | |
gci -r -File -Include src\*.cs,src\*.targets,src\*.props | foreach-object { $a = $_.fullname; ( get-content $a ) | foreach-object { $_ -replace "v0","$env:NBGV_GitCommitId" } | set-content $a } | |
$msbuild = vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | |
& $msbuild /r /v:m /p:Configuration=Release /nr:false "/t:Build;Pack" /p:PackageVersion=$env:NBGV_SemVer2 /p:Version=$env:NBGV_SemVer2 "/p:InformationalVersion=$env:NBGV_SemVer2+$env:NBGV_BuildingRef" "/p:PackageOutputPath=$env:GITHUB_WORKSPACE\artifacts" "/p:PackageReleaseNotesFile=$env:GITHUB_WORKSPACE\build\changelog.md" src\Uno.XamlMerge.Task\Uno.XamlMerge.Task.csproj | |
- name: Run Unit Tests | |
run: | | |
cd src\Uno.XamlMerge.Tests | |
dotnet test | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NuGet | |
path: .\artifacts | |
validate: | |
name: Validate Sample App | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- run: | | |
& dotnet tool update --global uno.check --version ${{ env.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json | |
& uno-check -v --ci --non-interactive --fix --skip xcode --skip androidemulator --skip gtk3 --skip vswin --skip vsmac | |
name: Install .NET Workloads | |
- name: Build task project | |
run: | | |
cd src\Uno.XamlMerge.Task | |
dotnet build -c Release | |
- name: Validate Test Projects | |
run: | | |
$msbuild = vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | |
& $msbuild /m /v:m /nr:false /r /p:Configuration=Release build\Uno.XamlMerge.Task-ci-only.slnf /p:AppxPackageSigningEnabled=false /p:AotAssemblies=false /p:WasmShellILLinkerEnabled=false | |
publish: | |
name: Publish | |
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }} | |
runs-on: windows-latest | |
needs: | |
- build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: NuGet | |
path: artifacts | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.x' | |
- name: Setup SignClient | |
run: | | |
dotnet tool install --tool-path build SignClient | |
- name: SignClient | |
run: | | |
if ("${{ secrets.SIGN_CLIENT_USER }}" -ne "") | |
{ | |
build\SignClient sign -i artifacts\*.nupkg -c build\SignClient.json -r "${{ secrets.SIGN_CLIENT_USER }}" -s "${{ secrets.SIGN_CLIENT_SECRET }}" -n "Uno.Check" -d "Uno.Check" -u "https://github.com/unoplatform/uno.check" | |
} | |
- name: NuGet Push | |
run: | | |
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_ORG_API_KEY }} |