|
| 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/[email protected] |
| 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: msvc-build tools |
| 38 | + shell: cmd |
| 39 | + run: | |
| 40 | + echo winSdkVer=%WindowsSdkVersion% |
| 41 | + echo winSdkDir=%WindowsSdkDir% |
| 42 | + mkdir WindowsSdkDir && cd WindowsSdkDir |
| 43 | + mkdir bin && cd bin && mkdir %WindowsSdkVersion% && cd %WindowsSdkVersion% && mkdir x64 x86 |
| 44 | + echo Copy SDK bin |
| 45 | + xcopy "%WindowsSdkDir%bin/%WindowsSdkVersion%/x64" x64 /Y /E /I /Q /H /C |
| 46 | + xcopy "%WindowsSdkDir%bin/%WindowsSdkVersion%/x86" x86 /Y /E /I /Q /H /C |
| 47 | + cd .. && cd .. && mkdir Debuggers && cd Debuggers && mkdir ddk inc lib x64 x86 |
| 48 | + echo Copy Debuggers tools |
| 49 | + xcopy "%WindowsSdkDir%Debuggers/ddk" ddk /Y /E /I /Q /H /C |
| 50 | + xcopy "%WindowsSdkDir%Debuggers/inc" inc /Y /E /I /Q /H /C |
| 51 | + xcopy "%WindowsSdkDir%Debuggers/lib" lib /Y /E /I /Q /H /C |
| 52 | + xcopy "%WindowsSdkDir%Debuggers/x64" x64 /Y /E /I /Q /H /C |
| 53 | + xcopy "%WindowsSdkDir%Debuggers/x86" x86 /Y /E /I /Q /H /C |
| 54 | + cd .. && mkdir Include && cd Include && mkdir %WindowsSdkVersion% wdf |
| 55 | + echo Copy SDK Include |
| 56 | + xcopy "%WindowsSdkDir%Include/%WindowsSdkVersion%" %WindowsSdkVersion% x64 /Y /E /I /Q /H /C |
| 57 | + xcopy "%WindowsSdkDir%Include/wdf" wdf /Y /E /I /Q /H /C |
| 58 | + cd .. && mkdir Source && cd Source && mkdir %WindowsSdkVersion% |
| 59 | + echo Copy SDK Source |
| 60 | + xcopy "%WindowsSdkDir%Source/%WindowsSdkVersion%" %WindowsSdkVersion% x64 /Y /E /I /Q /H /C |
| 61 | + cd .. && mkdir Lib && cd Lib && mkdir %WindowsSdkVersion% wdf |
| 62 | + echo Copy SDK Lib |
| 63 | + cd wdf && mkdir kmdf umdf |
| 64 | + echo Copy wdf: kmdf - x64 and x86 |
| 65 | + cd kmdf && mkdir x64 x86 |
| 66 | + xcopy "%WindowsSdkDir%Lib/wdf/kmdf/x64" x64 /Y /E /I /Q /H /C |
| 67 | + xcopy "%WindowsSdkDir%Lib/wdf/kmdf/x86" x86 /Y /E /I /Q /H /C |
| 68 | + echo Copy wdf: umdf - x64 and x86 |
| 69 | + cd .. && cd umdf && mkdir x64 x86 |
| 70 | + xcopy "%WindowsSdkDir%Lib/wdf/umdf/x64" x64 /Y /E /I /Q /H /C |
| 71 | + xcopy "%WindowsSdkDir%Lib/wdf/umdf/x86" x86 /Y /E /I /Q /H /C |
| 72 | + echo Copy SDK Lib - %WindowsSdkVersion% |
| 73 | + cd .. && cd .. && cd %WindowsSdkVersion% && mkdir km ucrt um ucrt_enclave |
| 74 | + echo Copy km: lib - x64 and x86 |
| 75 | + cd km && mkdir x64 x86 |
| 76 | + xcopy "%WindowsSdkDir%Lib/%WindowsSdkVersion%/km/x64" x64 /Y /E /I /Q /H /C |
| 77 | + xcopy "%WindowsSdkDir%Lib/%WindowsSdkVersion%/km/x86" x86 /Y /E /I /Q /H /C |
| 78 | + echo Copy ucrt: lib - x64 and x86 |
| 79 | + cd .. && cd ucrt && mkdir x64 x86 |
| 80 | + xcopy "%WindowsSdkDir%Lib/%WindowsSdkVersion%/ucrt/x64" x64 /Y /E /I /Q /H /C |
| 81 | + xcopy "%WindowsSdkDir%Lib/%WindowsSdkVersion%/ucrt/x86" x86 /Y /E /I /Q /H /C |
| 82 | + echo Copy um: lib - x64 and x86 |
| 83 | + cd .. && cd um && mkdir x64 x86 |
| 84 | + xcopy "%WindowsSdkDir%Lib/%WindowsSdkVersion%/um/x64" x64 /Y /E /I /Q /H /C |
| 85 | + xcopy "%WindowsSdkDir%Lib/%WindowsSdkVersion%/um/x86" x86 /Y /E /I /Q /H /C |
| 86 | + echo Copy ucrt_enclave: lib - x64 |
| 87 | + cd .. && cd ucrt_enclave && mkdir x64 |
| 88 | + xcopy "%WindowsSdkDir%Lib/%WindowsSdkVersion%/ucrt_enclave/x64" x64 /Y /E /I /Q /H /C |
| 89 | + cd .. && cd .. && cd .. |
| 90 | + del /S /Q *.pdb |
| 91 | + cd .. |
| 92 | +
|
| 93 | + - name: zip bin |
| 94 | + uses: thedoctor0/[email protected] |
| 95 | + with: |
| 96 | + type: 'zip' |
| 97 | + path: WindowsSdkDir/bin |
| 98 | + filename: 'bin.zip' |
| 99 | + |
| 100 | + - name: zip Debuggers |
| 101 | + uses: thedoctor0/[email protected] |
| 102 | + with: |
| 103 | + type: 'zip' |
| 104 | + path: WindowsSdkDir/Debuggers |
| 105 | + filename: 'Debuggers.zip' |
| 106 | + |
| 107 | + - name: zip Include |
| 108 | + uses: thedoctor0/[email protected] |
| 109 | + with: |
| 110 | + type: 'zip' |
| 111 | + path: WindowsSdkDir/Include |
| 112 | + filename: 'Include.zip' |
| 113 | + |
| 114 | + - name: zip Lib |
| 115 | + uses: thedoctor0/[email protected] |
| 116 | + with: |
| 117 | + type: 'zip' |
| 118 | + path: WindowsSdkDir/Lib |
| 119 | + filename: 'Lib.zip' |
| 120 | + |
| 121 | + - name: zip Source |
| 122 | + uses: thedoctor0/[email protected] |
| 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