-
Notifications
You must be signed in to change notification settings - Fork 725
109 lines (88 loc) · 3.34 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Update UWP Generated Branch
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{github.workflow}} - ${{github.ref}}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UnoCheck_Version: '1.26.0-dev.63'
jobs:
build:
name: update-uwp-branch
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Pin .NET Version
run: |
cp build/ci/net9/global.json global.json
- name: Setup .NET SDK
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3
with:
global-json-file: global.json
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}\dotnet
DOTNET_ROOT: ${{ runner.temp }}\dotnet
- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@31b3198b2de324472547fecec2c0f721b70c38e2 # v0.9.15
with:
versionSpec: '5.10.3'
- name: GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@31b3198b2de324472547fecec2c0f721b70c38e2 # v0.9.15
with:
useConfigFile: true
configFilePath: gitversion.yml
- name: setup git username
run: git config user.name "GitHub Actions Bot"
- name: Setup git email
run: git config user.email "<>"
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@34cfbaee7f672c76950673338facd8a73f637506 # v1.1
- run: echo "JAVA_HOME=$env:JAVA_HOME_11_X64" >> $env:GITHUB_ENV
name: Select JDK 11 (Java home)
- run: echo "JavaSdkDirectory=$env:JAVA_HOME_11_X64" >> $env:GITHUB_ENV
name: Select JDK 11 (Java sdk directory)
- run: |
& dotnet tool update --global uno.check --version $env:UnoCheck_Version --add-source https://api.nuget.org/v3/index.json
name: Install Uno Check
- run: |
& uno-check -v --ci --non-interactive --fix --skip androidemulator --skip xcode --skip gtk3 --skip vswin --skip vsmac --pre-major
name: Run uno-check
- name: Convert source tree to UWP
run: |
cd $env:GITHUB_WORKSPACE\src\Uno.WinUIRevert
dotnet run "$env:GITHUB_WORKSPACE"
- name: Workloads list
run: |
dotnet workload list
- 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:$env:GITHUB_WORKSPACE\artifacts-logs\msbuild.binlog
- name: Turn script debugging on
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: Set-PSDebug -Trace 1
- name: Stage all new/changed files
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: git add .
- name: Commit to repository
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: git commit -a -m "Update UWP Autoconvert from $env:GITHUB_SHA"
- name: Push to repository
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
run: git push origin $env:GITHUB_REF_NAME`:generated/$env:GITHUB_REF_NAME/uwp-autoconvert -f
- name: Upload Logs
uses: actions/upload-artifact@v4
if: always()
with:
name: logs
path: .\artifacts-logs