-
Notifications
You must be signed in to change notification settings - Fork 721
85 lines (70 loc) · 2.54 KB
/
uwp-autoconvert.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Update UWP Generated Branch
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UnoCheck_Version: '1.18.1'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/8a14128754833984a0c83398e7dda6d995199e1b/manifests/uno.ui.manifest.json'
# Only convert using NetPrevious
UnoDisableNetCurrentMobile: true
UnoDisableNetCurrent: true
jobs:
build:
name: update-uwp-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/[email protected]
with:
versionSpec: '5.10.3'
- name: GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
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/[email protected]
- 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 UWP
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 UWP Autoconvert from $env:GITHUB_SHA"
git push origin $env:GITHUB_REF_NAME`:generated/$env:GITHUB_REF_NAME/uwp-autoconvert -f