-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (134 loc) · 7.47 KB
/
get-win10sdk-tools.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: get-latest-win10-sdk-tools
on:
issue_comment:
types: [created]
jobs:
delete_win10sdk_latest:
name: Delete tag win10sdk_latest
if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'get_win10sdk') && github.event.issue.user.login == 'nonwill' && github.triggering_actor == 'nonwill' && github.event.comment.user.login == 'nonwill' }}
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Delete win10sdk_latest assets
uses: andreaswilli/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: win10sdk_latest
deleteOnlyFromDrafts: false
get_latest_win10sdk:
needs: delete_win10sdk_latest
name: Get latest win10sdk build tools
if: ${{ !github.event.issue.pull_request && contains(github.event.issue.labels.*.name, 'get_win10sdk') && github.event.issue.user.login == 'nonwill' && github.triggering_actor == 'nonwill' && github.event.comment.user.login == 'nonwill' }}
runs-on: windows-2019
steps:
- uses: ilammy/msvc-dev-cmd@v1
- name: Get version information
id: vars
shell: bash
run: |
echo "update_date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "win10sdk_install_dir=$WindowsSdkDir" >> $GITHUB_OUTPUT
echo "win10sdk_version=${WindowsSDKVersion%\\*}" >> $GITHUB_OUTPUT
- name: win10sdk-build tools
shell: cmd
run: |
set winSdkVer=%WindowsSDKVersion:~0,-1%
echo winSdkVer=%steps.vars.outputs.win10sdk_version%
echo winSdkDir=%WindowsSdkDir%
mkdir WindowsSdkDir && cd WindowsSdkDir
mkdir bin && cd bin && mkdir %winSdkVer% && cd %winSdkVer% && mkdir x64 x86
echo Copy SDK bin
xcopy "%WindowsSdkDir%bin/%winSdkVer%/x64" x64 /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%bin/%winSdkVer%/x86" x86 /Y /E /I /Q /H /C
cd .. && cd .. && mkdir Debuggers && cd Debuggers && mkdir ddk inc lib x64 x86
echo Copy Debuggers tools
xcopy "%WindowsSdkDir%Debuggers/ddk" ddk /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Debuggers/inc" inc /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Debuggers/lib" lib /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Debuggers/x64" x64 /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Debuggers/x86" x86 /Y /E /I /Q /H /C
cd .. && mkdir Include && cd Include && mkdir %winSdkVer% wdf
echo Copy SDK Include
xcopy "%WindowsSdkDir%Include/%winSdkVer%" %winSdkVer% /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Include/wdf" wdf /Y /E /I /Q /H /C
cd .. && mkdir Source && cd Source && mkdir %winSdkVer%
echo Copy SDK Source
xcopy "%WindowsSdkDir%Source/%winSdkVer%" %winSdkVer% /Y /E /I /Q /H /C
cd .. && mkdir Lib && cd Lib && mkdir %winSdkVer% wdf
echo Copy SDK Lib
cd wdf && mkdir kmdf umdf
echo Copy wdf: kmdf - x64 and x86
cd kmdf && mkdir x64 x86
xcopy "%WindowsSdkDir%Lib/wdf/kmdf/x64" x64 /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Lib/wdf/kmdf/x86" x86 /Y /E /I /Q /H /C
echo Copy wdf: umdf - x64 and x86
cd .. && cd umdf && mkdir x64 x86
xcopy "%WindowsSdkDir%Lib/wdf/umdf/x64" x64 /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Lib/wdf/umdf/x86" x86 /Y /E /I /Q /H /C
echo Copy SDK Lib - %winSdkVer%
cd .. && cd .. && cd %winSdkVer% && mkdir km ucrt um ucrt_enclave
echo Copy km: lib - x64 and x86
cd km && mkdir x64 x86
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/km/x64" x64 /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/km/x86" x86 /Y /E /I /Q /H /C
echo Copy ucrt: lib - x64 and x86
cd .. && cd ucrt && mkdir x64 x86
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/ucrt/x64" x64 /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/ucrt/x86" x86 /Y /E /I /Q /H /C
echo Copy um: lib - x64 and x86
cd .. && cd um && mkdir x64 x86
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/um/x64" x64 /Y /E /I /Q /H /C
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/um/x86" x86 /Y /E /I /Q /H /C
echo Copy ucrt_enclave: lib - x64
cd .. && cd ucrt_enclave && mkdir x64
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/ucrt_enclave/x64" x64 /Y /E /I /Q /H /C
cd .. && cd .. && cd ..
cd ..
- name: zip bin
uses: thedoctor0/[email protected]
with:
type: 'zip'
path: WindowsSdkDir/bin
filename: 'bin.zip'
- name: zip Debuggers
uses: thedoctor0/[email protected]
with:
type: 'zip'
path: WindowsSdkDir/Debuggers
filename: 'Debuggers.zip'
- name: zip Include
uses: thedoctor0/[email protected]
with:
type: 'zip'
path: WindowsSdkDir/Include
filename: 'Include.zip'
- name: zip Lib
uses: thedoctor0/[email protected]
with:
type: 'zip'
path: WindowsSdkDir/Lib
filename: 'Lib.zip'
- name: zip Source
uses: thedoctor0/[email protected]
with:
type: 'zip'
path: WindowsSdkDir/Source
filename: 'Source.zip'
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
tag_name: win10sdk_latest
name: Latest Win10 SDK build tools for Windows x86/x64
body: |
date: ${{ steps.vars.outputs.update_date }}
from: ${{ steps.vars.outputs.win10sdk_install_dir }}
Version: ${{ steps.vars.outputs.win10sdk_version }}
draft: false
prerelease: false
files: |
bin.zip
Debuggers.zip
Include.zip
Lib.zip
Source.zip