mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-04-02 10:52:54 -04:00
* Bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Bump actions/download-artifact from 3 to 4 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * github: group github actions updates going forward * ci: update to labeler@v5 * ci: properly differentiate between windows build artifacts on PRs * ci: workaround flatpak-builder temporarily as well as test fix * ci: simplify things, just explicitly specify the artifact names in the workflows --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
44 lines
996 B
Bash
Executable file
44 lines
996 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Artifact Naming Scheme:
|
|
# PCSX2-<OS>-Qt-[BUILD_SYSTEM]-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
|
|
# -- limited to 200 chars
|
|
# Outputs:
|
|
# - artifact-name
|
|
|
|
# Example - PCSX2-linux-Qt-x64-flatpak-sse4-sha[e880a2749]
|
|
|
|
# Inputs as env-vars
|
|
# PREFIX
|
|
# EVENT_NAME
|
|
# PR_TITLE
|
|
# PR_NUM
|
|
# PR_SHA
|
|
|
|
if [[ -z "${PREFIX}" ]]; then
|
|
echo "PREFIX is not set, can't name artifact without it!"
|
|
exit 1
|
|
fi
|
|
|
|
NAME="${PREFIX}"
|
|
|
|
# Add PR / Commit Metadata
|
|
if [ "$EVENT_NAME" == "pull_request" ]; then
|
|
PR_SHA=$(git rev-parse --short "${PR_SHA}")
|
|
if [ ! -z "${PR_NUM}" ]; then
|
|
NAME="${NAME}-pr[${PR_NUM}]"
|
|
fi
|
|
NAME="${NAME}-sha[${PR_SHA}]"
|
|
if [ ! -z "${PR_TITLE}" ]; then
|
|
PR_TITLE=$(echo "${PR_TITLE}" | tr -cd '[a-zA-Z0-9[:space:]]_-')
|
|
NAME="${NAME}-title[${PR_TITLE}"
|
|
fi
|
|
else
|
|
SHA=$(git rev-parse --short "$GITHUB_SHA")
|
|
NAME="${NAME}-sha[${SHA}"
|
|
fi
|
|
|
|
# Trim the Name
|
|
NAME=$(printf "%.199s]" "$NAME")
|
|
echo "${NAME}"
|
|
echo "artifact-name=${NAME}" >> "$GITHUB_OUTPUT"
|