Skip to content

Commit 779c647

Browse files
committed
get-win10sdk-tools
1 parent 7ea14c1 commit 779c647

1 file changed

Lines changed: 144 additions & 0 deletions

File tree

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
name: get-latest-win10-sdk-tools
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
delete_win10sdk_latest:
9+
name: Delete tag win10sdk_latest
10+
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' }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out Git repository
14+
uses: actions/checkout@v1
15+
- name: Delete win10sdk_latest assets
16+
uses: andreaswilli/delete-release-assets-action@v3.0.0
17+
with:
18+
github_token: ${{ secrets.GITHUB_TOKEN }}
19+
tag: win10sdk_latest
20+
deleteOnlyFromDrafts: false
21+
22+
get_latest_win10sdk:
23+
needs: delete_win10sdk_latest
24+
name: Get latest win10sdk build tools
25+
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' }}
26+
runs-on: windows-2019
27+
steps:
28+
- uses: ilammy/msvc-dev-cmd@v1
29+
- name: Get version information
30+
id: vars
31+
shell: bash
32+
run: |
33+
echo "update_date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
34+
echo "win10sdk_install_dir=$WindowsSdkDir" >> $GITHUB_OUTPUT
35+
echo "win10sdk_version=${WindowsSDKVersion%\\*}" >> $GITHUB_OUTPUT
36+
37+
- name: win10sdk-build tools
38+
shell: cmd
39+
run: |
40+
set winSdkVer=%WindowsSDKVersion:~0,-1%
41+
echo winSdkVer=%steps.vars.outputs.win10sdk_version%
42+
echo winSdkDir=%WindowsSdkDir%
43+
mkdir WindowsSdkDir && cd WindowsSdkDir
44+
mkdir bin && cd bin && mkdir %winSdkVer% && cd %winSdkVer% && mkdir x64 x86
45+
echo Copy SDK bin
46+
xcopy "%WindowsSdkDir%bin/%winSdkVer%/x64" x64 /Y /E /I /Q /H /C
47+
xcopy "%WindowsSdkDir%bin/%winSdkVer%/x86" x86 /Y /E /I /Q /H /C
48+
cd .. && cd .. && mkdir Debuggers && cd Debuggers && mkdir ddk inc lib x64 x86
49+
echo Copy Debuggers tools
50+
xcopy "%WindowsSdkDir%Debuggers/ddk" ddk /Y /E /I /Q /H /C
51+
xcopy "%WindowsSdkDir%Debuggers/inc" inc /Y /E /I /Q /H /C
52+
xcopy "%WindowsSdkDir%Debuggers/lib" lib /Y /E /I /Q /H /C
53+
xcopy "%WindowsSdkDir%Debuggers/x64" x64 /Y /E /I /Q /H /C
54+
xcopy "%WindowsSdkDir%Debuggers/x86" x86 /Y /E /I /Q /H /C
55+
cd .. && mkdir Include && cd Include && mkdir %winSdkVer% wdf
56+
echo Copy SDK Include
57+
xcopy "%WindowsSdkDir%Include/%winSdkVer%" %winSdkVer% /Y /E /I /Q /H /C
58+
xcopy "%WindowsSdkDir%Include/wdf" wdf /Y /E /I /Q /H /C
59+
cd .. && mkdir Source && cd Source && mkdir %winSdkVer%
60+
echo Copy SDK Source
61+
xcopy "%WindowsSdkDir%Source/%winSdkVer%" %winSdkVer% /Y /E /I /Q /H /C
62+
cd .. && mkdir Lib && cd Lib && mkdir %winSdkVer% wdf
63+
echo Copy SDK Lib
64+
cd wdf && mkdir kmdf umdf
65+
echo Copy wdf: kmdf - x64 and x86
66+
cd kmdf && mkdir x64 x86
67+
xcopy "%WindowsSdkDir%Lib/wdf/kmdf/x64" x64 /Y /E /I /Q /H /C
68+
xcopy "%WindowsSdkDir%Lib/wdf/kmdf/x86" x86 /Y /E /I /Q /H /C
69+
echo Copy wdf: umdf - x64 and x86
70+
cd .. && cd umdf && mkdir x64 x86
71+
xcopy "%WindowsSdkDir%Lib/wdf/umdf/x64" x64 /Y /E /I /Q /H /C
72+
xcopy "%WindowsSdkDir%Lib/wdf/umdf/x86" x86 /Y /E /I /Q /H /C
73+
echo Copy SDK Lib - %winSdkVer%
74+
cd .. && cd .. && cd %winSdkVer% && mkdir km ucrt um ucrt_enclave
75+
echo Copy km: lib - x64 and x86
76+
cd km && mkdir x64 x86
77+
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/km/x64" x64 /Y /E /I /Q /H /C
78+
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/km/x86" x86 /Y /E /I /Q /H /C
79+
echo Copy ucrt: lib - x64 and x86
80+
cd .. && cd ucrt && mkdir x64 x86
81+
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/ucrt/x64" x64 /Y /E /I /Q /H /C
82+
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/ucrt/x86" x86 /Y /E /I /Q /H /C
83+
echo Copy um: lib - x64 and x86
84+
cd .. && cd um && mkdir x64 x86
85+
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/um/x64" x64 /Y /E /I /Q /H /C
86+
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/um/x86" x86 /Y /E /I /Q /H /C
87+
echo Copy ucrt_enclave: lib - x64
88+
cd .. && cd ucrt_enclave && mkdir x64
89+
xcopy "%WindowsSdkDir%Lib/%winSdkVer%/ucrt_enclave/x64" x64 /Y /E /I /Q /H /C
90+
cd .. && cd .. && cd ..
91+
cd ..
92+
93+
- name: zip bin
94+
uses: thedoctor0/zip-release@0.7.1
95+
with:
96+
type: 'zip'
97+
path: WindowsSdkDir/bin
98+
filename: 'bin.zip'
99+
100+
- name: zip Debuggers
101+
uses: thedoctor0/zip-release@0.7.1
102+
with:
103+
type: 'zip'
104+
path: WindowsSdkDir/Debuggers
105+
filename: 'Debuggers.zip'
106+
107+
- name: zip Include
108+
uses: thedoctor0/zip-release@0.7.1
109+
with:
110+
type: 'zip'
111+
path: WindowsSdkDir/Include
112+
filename: 'Include.zip'
113+
114+
- name: zip Lib
115+
uses: thedoctor0/zip-release@0.7.1
116+
with:
117+
type: 'zip'
118+
path: WindowsSdkDir/Lib
119+
filename: 'Lib.zip'
120+
121+
- name: zip Source
122+
uses: thedoctor0/zip-release@0.7.1
123+
with:
124+
type: 'zip'
125+
path: WindowsSdkDir/Source
126+
filename: 'Source.zip'
127+
128+
- name: Create Release and Upload Release Asset
129+
uses: softprops/action-gh-release@v1
130+
with:
131+
tag_name: win10sdk_latest
132+
name: Latest Win10 SDK build tools for Windows x86/x64
133+
body: |
134+
date: ${{ steps.vars.outputs.update_date }}
135+
from: ${{ steps.vars.outputs.win10sdk_install_dir }}
136+
Version: ${{ steps.vars.outputs.win10sdk_version }}
137+
draft: false
138+
prerelease: false
139+
files: |
140+
bin.zip
141+
Debuggers.zip
142+
Include.zip
143+
Lib.zip
144+
Source.zip

0 commit comments

Comments
 (0)