From 079ae9ef431477cf4eb17d05d20457ebbf1001ab Mon Sep 17 00:00:00 2001 From: tGecko Date: Sun, 1 Sep 2024 12:40:51 +0200 Subject: [PATCH] include git short hash in artifact filename --- .github/workflows/linux-qt.yml | 6 +++++- .github/workflows/linux.yml | 8 ++++++-- .github/workflows/macos-qt.yml | 6 +++++- .github/workflows/macos.yml | 6 +++++- .github/workflows/windows-qt.yml | 9 ++++++++- .github/workflows/windows.yml | 9 ++++++++- 6 files changed, 37 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux-qt.yml b/.github/workflows/linux-qt.yml index 26b80d68..efafb6e5 100644 --- a/.github/workflows/linux-qt.yml +++ b/.github/workflows/linux-qt.yml @@ -34,8 +34,12 @@ jobs: - name: Run AppImage packaging script run: ./.github/linux-appimage-qt.sh + - name: Retrieve Git Hash + id: git-hash + run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Upload executable uses: actions/upload-artifact@v4 with: - name: shadps4-linux-qt + name: shadps4-linux-qt-${{ steps.git-hash.outputs.hash }} path: Shadps4-qt.AppImage \ No newline at end of file diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ef77a16c..081e3259 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -31,10 +31,14 @@ jobs: - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel + - name: Retrieve Git Hash + id: git-hash + run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Upload executable uses: actions/upload-artifact@v4 with: - name: shadps4-ubuntu64 + name: shadps4-ubuntu64-${{ steps.git-hash.outputs.hash }} path: | ${{github.workspace}}/build/shadps4 @@ -44,5 +48,5 @@ jobs: - name: Upload executable uses: actions/upload-artifact@v4 with: - name: shadps4-sdl-appimage + name: shadps4-sdl-appimage-${{ steps.git-hash.outputs.hash }} path: Shadps4-sdl.AppImage diff --git a/.github/workflows/macos-qt.yml b/.github/workflows/macos-qt.yml index 8a882b30..2b94c7b0 100644 --- a/.github/workflows/macos-qt.yml +++ b/.github/workflows/macos-qt.yml @@ -53,8 +53,12 @@ jobs: macdeployqt upload/shadps4.app tar cf shadps4-macos-qt.tar.gz -C upload . + - name: Retrieve Git Hash + id: git-hash + run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Upload executable uses: actions/upload-artifact@v4 with: - name: shadps4-macos-qt + name: shadps4-macos-qt-${{ steps.git-hash.outputs.hash }} path: shadps4-macos-qt.tar.gz diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 1a2a6eff..451b06e8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -45,8 +45,12 @@ jobs: install_name_tool -add_rpath "@loader_path" upload/shadps4 tar cf shadps4-macos-sdl.tar.gz -C upload . + - name: Retrieve Git Hash + id: git-hash + run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Upload executable uses: actions/upload-artifact@v4 with: - name: shadps4-macos-sdl + name: shadps4-macos-sdl-${{ steps.git-hash.outputs.hash }} path: shadps4-macos-sdl.tar.gz diff --git a/.github/workflows/windows-qt.yml b/.github/workflows/windows-qt.yml index 1c865736..8b543005 100644 --- a/.github/workflows/windows-qt.yml +++ b/.github/workflows/windows-qt.yml @@ -41,9 +41,16 @@ jobs: mkdir upload move build/Release/shadPS4.exe upload windeployqt --dir upload upload/shadPS4.exe + + - name: Retrieve Git Hash + id: git-hash + shell: cmd + run: | + FOR /F "tokens=*" %%g IN ('git rev-parse --short HEAD') do (SET HASH=%%g) + echo hash=%HASH% >> %GITHUB_OUTPUT% - name: Upload executable uses: actions/upload-artifact@v4 with: - name: shadps4-win64-qt + name: shadps4-win64-qt-${{ steps.git-hash.outputs.hash }} path: upload diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 49912486..a2beae62 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -26,9 +26,16 @@ jobs: - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel + - name: Retrieve Git Hash + id: git-hash + shell: cmd + run: | + FOR /F "tokens=*" %%g IN ('git rev-parse --short HEAD') do (SET HASH=%%g) + echo hash=%HASH% >> %GITHUB_OUTPUT% + - name: Upload executable uses: actions/upload-artifact@v4 with: - name: shadps4-win64-sdl + name: shadps4-win64-sdl-${{ steps.git-hash.outputs.hash }} path: | ${{github.workspace}}/build/Release/shadPS4.exe