@@ -72,27 +72,33 @@ jobs:
7272 id : " info"
7373 run : |
7474 # Retrieving informations...
75- ZIP_FOLDER='${{ steps.build.outputs.ZIP_FOLDER }}'
76- : "${ZIP_FOLDER:?}" || exit "${?}"
75+ test -n '${{ steps.build.outputs.ZIP_FOLDER }}' || exit 3
7776 ZIP_FILENAME='${{ steps.build.outputs.ZIP_FILENAME }}'
7877 ZIP_VERSION='${{ steps.build.outputs.ZIP_VERSION }}'
7978 ZIP_SHORT_COMMIT_ID='${{ steps.build.outputs.ZIP_SHORT_COMMIT_ID }}'
79+ ZIP_IS_ALPHA='${{ steps.build.outputs.ZIP_IS_ALPHA }}'
8080 ZIP_BUILD_TYPE='${{ steps.build.outputs.ZIP_BUILD_TYPE }}'
8181 ZIP_BUILD_TYPE_SUPPORTED='${{ steps.build.outputs.ZIP_BUILD_TYPE_SUPPORTED }}'
82- ZIP_IS_ALPHA='${{ steps.build.outputs.ZIP_IS_ALPHA }}'
83- ZIP_SHA256='${{ steps.build.outputs.ZIP_SHA256 }}'
8482 ZIP_MD5='${{ steps.build.outputs.ZIP_MD5 }}'
83+ ZIP_SHA256='${{ steps.build.outputs.ZIP_SHA256 }}'
8584 ZIP_ATTESTATION_URL='${{ steps.attest.outputs.attestation-url }}'
8685 # Displaying informations...
8786 printf '%s\n' "::notice::Filename: ${ZIP_FILENAME:-Missing}"
88- printf '%s\n' "::notice::Version: ${ZIP_VERSION:-Missing}"
89- printf '%s\n' "::notice::Short commit ID: ${ZIP_SHORT_COMMIT_ID:-Missing}"
90- printf '%s\n' "::notice::Build type: ${ZIP_BUILD_TYPE:?}"
87+ printf '%s\n' "::notice::Version: ${ZIP_VERSION:?} - Short commit ID: ${ZIP_SHORT_COMMIT_ID:?} - Is alpha: ${ZIP_IS_ALPHA:?} - Build type: ${ZIP_BUILD_TYPE:?}"
88+ if '${{ github.ref_name && github.ref_name != github.event.repository.default_branch }}'; then
89+ ZIP_RETENTION_DAYS=30
90+ printf '%s\n' '::notice::Branch: ${{ github.ref_name }}'
91+ else
92+ ZIP_RETENTION_DAYS=10
93+ fi
9194 printf '%s\n' "::notice::Build type supported: ${ZIP_BUILD_TYPE_SUPPORTED:?}"
92- printf '%s\n' "::notice::Is alpha: ${ZIP_IS_ALPHA:-Missing}"
93- printf '%s\n' "::notice::SHA-256: ${ZIP_SHA256:-Missing}"
9495 printf '%s\n' "::notice::MD5: ${ZIP_MD5:-Missing}"
96+ printf '%s\n' "::notice::SHA-256: ${ZIP_SHA256:-Missing}"
97+ printf '%s\n' "::notice::Logs retention days: ${{ github.retention_days }}"
98+ printf '%s\n' "::notice::Artifacts retention days: ${ZIP_RETENTION_DAYS:?}"
9599 printf '%s\n' "::notice::Attestation: ${ZIP_ATTESTATION_URL:-Missing}"
100+ # Outputs
101+ printf 'ZIP_RETENTION_DAYS=%s\n' "${ZIP_RETENTION_DAYS:?}" 1>> "${GITHUB_OUTPUT?}"
96102 # Preparing temp folder...
97103 export TMPDIR="${TMPDIR:-${RUNNER_TEMP:-${TMP:-${TEMP:-/tmp}}}}" || exit "${?}"
98104 our_tmp_dir="$(mktemp -d -t -- "RELEASE-${ZIP_IS_ALPHA:?}-XXXXXX")" || exit "${?}"
@@ -227,9 +233,10 @@ jobs:
227233 with :
228234 name : " ${{ github.event.repository.name }} ${{ github.ref_name }} g${{ steps.build.outputs.ZIP_SHORT_COMMIT_ID }} ${{ steps.build.outputs.ZIP_BUILD_TYPE }} (extract it)"
229235 path : " ${{ steps.build.outputs.ZIP_FOLDER }}/*.zip*"
230- if-no-files-found : " error "
231- retention-days : 10
236+ overwrite : false
237+ retention-days : " ${{ steps.info.outputs.ZIP_RETENTION_DAYS }} "
232238 compression-level : 0
239+ if-no-files-found : " error"
233240
234241 keep-alive :
235242 name : " Keep alive"
0 commit comments