Merge pull request #13658 from unoplatform/dev/jela/store-deploy #42
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: Update WinUI Generate Branch | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
UnoCheck_Version: '1.11.0-dev.2' | |
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json' | |
# Only convert using NetPrevious | |
UnoDisableNetCurrentMobile: true | |
UnoDisableNetCurrent: true | |
jobs: | |
build: | |
name: update-winui-branch | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Pin .NET Version | |
run: | | |
(Get-Content global.json).replace("latestFeature", "disable") | Set-Content global.json | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
global-json-file: global.json | |
- name: Setup GitVersion | |
uses: gittools/actions/gitversion/setup@v0.9.15 | |
with: | |
versionSpec: '5.10.3' | |
- name: GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0.9.15 | |
with: | |
useConfigFile: true | |
configFilePath: gitversion.yml | |
- name: setup git config | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
- run: | | |
echo "JAVA_HOME=$env:JAVA_HOME_11_X64" >> $env:GITHUB_ENV | |
echo "JavaSdkDirectory=$env:JAVA_HOME_11_X64" >> $env:GITHUB_ENV | |
name: Select JDK 11 | |
- 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 androidsdk --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest $env:UnoCheck_Manifest | |
name: Install .NET Workloads | |
- name: Convert source tree to WinUI | |
run: | | |
cd $env:GITHUB_WORKSPACE\src\Uno.WinUIRevert | |
dotnet run "$env:GITHUB_WORKSPACE" | |
- name: Run API Sync Tool | |
run: | | |
cd $env:GITHUB_WORKSPACE\build | |
msbuild Uno.UI.Build.csproj /v:m "/p:CombinedConfiguration=Release|AnyCPU" /m /t:RunAPISyncTool /bl | |
- name: Commit to repository | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: | | |
Set-PSDebug -Trace 1 | |
git add . | |
git commit -m "Update WinUI Autoconvert from $env:GITHUB_SHA" | |
git push origin $env:GITHUB_REF_NAME`:generated/$env:GITHUB_REF_NAME/winui-autoconvert -f |