@@ -8,15 +8,7 @@ name: Build
88
99on :
1010 push :
11- branches :
12- - ' **'
13- tags-ignore :
14- - ' **'
1511 pull_request :
16- branches :
17- - ' **'
18- tags-ignore :
19- - ' **'
2012 workflow_dispatch :
2113 inputs :
2214 ref :
3325 SOLUTION_FILE_PATH : .
3426 BUILD_CONFIGURATION : Release
3527
28+ permissions :
29+ contents : write
30+
3631jobs :
3732 build :
3833 runs-on : windows-2025
39-
34+ timeout-minutes : 30
4035 steps :
4136 - name : Print inputs
4237 shell : bash
4338 run : |
44- echo "ref: ${{ github.event.inputs.ref }}"
45- echo "config: ${{ github.event.inputs.config }}"
46- echo "build_dir: ${{ github.event.inputs.build_dir }}"
39+ echo "ref: ${GITHUB_EVENT_INPUTS_REF}"
40+ echo "config: ${GITHUB_EVENT_INPUTS_CONFIG}"
41+ echo "build_dir: ${GITHUB_EVENT_INPUTS_BUILD_DIR}"
42+ env :
43+ GITHUB_EVENT_INPUTS_REF : ${{ github.event.inputs.ref }}
44+ GITHUB_EVENT_INPUTS_CONFIG : ${{ github.event.inputs.config }}
45+ GITHUB_EVENT_INPUTS_BUILD_DIR : ${{ github.event.inputs.build_dir }}
4746
4847 - name : Checkout latest build and submodules
49- uses : actions/checkout@v4
48+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
5049 if : github.event.inputs.ref == ''
5150 with :
5251 submodules : recursive
5352 persist-credentials : false
5453
5554 - name : Checkout specific build and submodules
56- uses : actions/checkout@v4
55+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
5756 if : github.event.inputs.ref != ''
5857 with :
5958 ref : ${{ github.event.inputs.ref }}
6059 submodules : recursive
6160 persist-credentials : false
6261
6362 - name : Add MSBuild to PATH
64- uses : microsoft/setup-msbuild@v2
63+ uses : microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # 2.0.0
6564
6665 - name : Declare some variables
6766 id : vars
8281 exit /b 0
8382
8483 - name : Setup NuGet
85- uses : nuget/setup-nuget@v2
84+ uses : nuget/setup-nuget@323ab0502cd38fdc493335025a96c8fdb0edc71f # 2.0.1
85+ with :
86+ nuget-version : ' 7.x'
8687
8788 - name : Restore NuGet packages
8889 run : |
9495 BuildDependencies%BUILD_CONFIGURATION%.bat
9596
9697 - name : Download ep_taskbar
97- uses : robinraju/release-downloader@v1
98+ uses : robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # 1.12
9899 with :
99100 repository : ExplorerPatcher/ep_taskbar_releases
100101 fileName : ep_taskbar.*.dll
@@ -112,44 +113,48 @@ jobs:
112113 mv "$file" "build/Release/x64/$(basename "$file" .amd64.dll).dll"
113114 done
114115 fi
115-
116+
116117 if ls build/Release/ep_taskbar.*.arm64.dll 1> /dev/null 2>&1; then
117118 mkdir -p build/Release/ARM64
118119 for file in build/Release/ep_taskbar.*.arm64.dll; do
119120 mv "$file" "build/Release/ARM64/$(basename "$file" .arm64.dll).dll"
120121 done
121122 fi
122123
123- - name : Build EP IA-32
124+ - name : Build ExplorerPatcher ( IA-32)
124125 if : github.event.inputs.config == ''
125126 working-directory : ${{env.GITHUB_WORKSPACE}}
126127 run : |
127128 msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=IA-32 ${{env.SOLUTION_FILE_PATH}}
128129
129- - name : Build EP amd64
130+ - name : Build ExplorerPatcher ( amd64)
130131 if : github.event.inputs.config == ''
131132 working-directory : ${{env.GITHUB_WORKSPACE}}
132133 run : |
133134 msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=amd64 ${{env.SOLUTION_FILE_PATH}}
134135
135- - name : Build EP arm64
136+ - name : Build ExplorerPatcher ( arm64)
136137 if : github.event.inputs.config == ''
137138 working-directory : ${{env.GITHUB_WORKSPACE}}
138139 run : |
139140 msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=arm64 /p:WithArm64XBinaries=true ${{env.SOLUTION_FILE_PATH}}
140141
141- - name : Build EP custom
142+ - name : Build ExplorerPatcher (Custom Build)
142143 if : github.event.inputs.config != ''
143144 working-directory : ${{env.GITHUB_WORKSPACE}}
144145 run : |
145- msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{ github.event.inputs.config }} ${{env.SOLUTION_FILE_PATH}}
146+ msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=$env:GITHUB_EVENT_INPUTS_CONFIG ${{env.SOLUTION_FILE_PATH}}
147+ env :
148+ GITHUB_EVENT_INPUTS_CONFIG : ${{ github.event.inputs.config }}
146149
147150 - name : Create expected build directory
148151 if : github.event.inputs.build_dir != ''
149152 shell : bash
150153 run : |
151154 mkdir build
152- cp -r ${{ github.event.inputs.build_dir }}/Release build/Release
155+ cp -r ${GITHUB_EVENT_INPUTS_BUILD_DIR}/Release build/Release
156+ env :
157+ GITHUB_EVENT_INPUTS_BUILD_DIR : ${{ github.event.inputs.build_dir }}
153158
154159 - name : Generate dxgi.dll
155160 shell : bash
@@ -182,11 +187,13 @@ jobs:
182187 rm -f build/Release/ARM64/ep_setup_files.zip.bin
183188
184189 - name : Upload artifacts
185- uses : actions/upload-artifact@v4
190+ if : github.event_name != 'pull_request'
191+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
186192 with :
187193 name : ep_bin_multi_${{ steps.vars.outputs.sha_short }}_${{ steps.vars.outputs.branch }}
188194 path : |
189195 build/Release/
196+ if-no-files-found : error
190197
191198 # build/Release/x64/ep_setup.exe -> build/Release/ep_setup.exe
192199 # build/Release/ARM64/ep_setup.exe -> build/Release/ep_setup_arm64.exe
@@ -215,12 +222,15 @@ jobs:
215222 if : github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
216223 run : |
217224 echo "data<<EP_RELEASE_DESCRIPTION_DELIM" >> $GITHUB_OUTPUT
218- echo "$(./ep_generate_release_description.exe ${{ steps.vars.outputs.sha_short }} ${{ steps.vars.outputs.branch } } ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_OUTPUT
225+ echo "$(./ep_generate_release_description.exe ${STEPS_VARS_OUTPUTS_SHA_SHORT} ${STEPS_VARS_OUTPUTS_BRANCH } ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_OUTPUT
219226 echo "EP_RELEASE_DESCRIPTION_DELIM" >> $GITHUB_OUTPUT
220227 id : release_description
228+ env :
229+ STEPS_VARS_OUTPUTS_SHA_SHORT : ${{ steps.vars.outputs.sha_short }}
230+ STEPS_VARS_OUTPUTS_BRANCH : ${{ steps.vars.outputs.branch }}
221231
222232 - name : Create/update release (valinet)
223- uses : softprops/action-gh-release@v2
233+ uses : softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # 2.5.0
224234 if : github.repository_owner == 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
225235 id : create_release
226236 with :
@@ -236,7 +246,7 @@ jobs:
236246 GITHUB_TOKEN : ${{ secrets.PAT }}
237247
238248 - name : Create/update release (forks)
239- uses : softprops/action-gh-release@v2
249+ uses : softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # 2.5.0
240250 if : github.repository_owner != 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
241251 id : create_release_fork
242252 with :
@@ -250,3 +260,5 @@ jobs:
250260 build/Release/ep_setup_arm64.exe
251261 env :
252262 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
263+
264+
0 commit comments