Skip to content

Commit 4e1d441

Browse files
committed
Retain windows in artifact file names but not in metadata file names
1 parent 4ff89ee commit 4e1d441

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/build.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -221,16 +221,16 @@ jobs:
221221

222222
- name: Rename artifacts
223223
run: |
224-
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2019-${{ github.sha }}.7z vcpkg-x64-2019-${{ env.file }}.7z
225-
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2022-${{ github.sha }}.7z vcpkg-x64-2022-${{ env.file }}.7z
226-
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2019-pdb-${{ github.sha }}.7z vcpkg-x64-2019-pdb-${{ env.file }}.7z
227-
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2022-pdb-${{ github.sha }}.7z vcpkg-x64-2022-pdb-${{ env.file }}.7z
224+
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2019-${{ github.sha }}.7z vcpkg-x64-windows-2019-${{ env.file }}.7z
225+
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2022-${{ github.sha }}.7z vcpkg-x64-windows-2022-${{ env.file }}.7z
226+
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2019-pdb-${{ github.sha }}.7z vcpkg-x64-windows-2019-pdb-${{ env.file }}.7z
227+
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2022-pdb-${{ github.sha }}.7z vcpkg-x64-windows-2022-pdb-${{ env.file }}.7z
228228
229229
- name: Release
230230
if: startsWith(github.ref, 'refs/tags/')
231231
uses: softprops/action-gh-release@v2
232232
with:
233-
files: vcpkg-x64-*-${{ env.file }}.7z
233+
files: vcpkg-x64-windows-*-${{ env.file }}.7z
234234

235235
- name: Setup ssh-agent
236236
env:
@@ -288,9 +288,10 @@ jobs:
288288

289289
- name: Generate files containing a download url and hash
290290
run: |
291-
for file in vcpkg-x64-*-${{ env.file }}.7z; do
292-
echo "${{ github.server_url }}/${{ github.repository }}/releases/download/${{ env.file }}/$file" > "openmw-deps/windows/$file.txt"
293-
shasum -a 512 "$file" >> "openmw-deps/windows/$file.txt"
291+
for file in vcpkg-x64-windows-*-${{ env.file }}.7z; do
292+
filename=`echo "$file" | sed -r 's/vcpkg-x64-windows-(.+)-${{ env.file }}.7z/vcpkg-x64-\1-${{ env.file }}.txt/'`
293+
echo "${{ github.server_url }}/${{ github.repository }}/releases/download/${{ env.file }}/$file" > "openmw-deps/windows/$filename"
294+
shasum -a 512 "$file" >> "openmw-deps/windows/$filename"
294295
done
295296
296297
- name: Generate commit message
@@ -308,8 +309,8 @@ jobs:
308309
- name: Commit generated metadata
309310
working-directory: ${{ github.workspace }}/openmw-deps
310311
run: |
311-
git checkout -b vcpkg-x64-${{ github.sha }}
312-
git add windows/vcpkg-x64-*-${{ env.file }}.7z.txt
312+
git checkout -b vcpkg-x64-windows-${{ github.sha }}
313+
git add windows/vcpkg-x64-*-${{ env.file }}.txt
313314
git commit -F commit_message.txt
314315
315316
- name: Verify commit to openmw-deps repository
@@ -325,4 +326,4 @@ jobs:
325326
working-directory: ${{ github.workspace }}/openmw-deps
326327
run: |
327328
git remote set-url --push origin "${{ vars.PUSH_URL }}"
328-
git push origin vcpkg-x64-${{ github.sha }}
329+
git push origin vcpkg-x64-windows-${{ github.sha }}

0 commit comments

Comments
 (0)