rename upload_artifacts to artifact_upload_mode

This commit is contained in:
João Marcos 2025-04-06 19:09:59 -03:00
parent 94ce4fb6cb
commit b14aea6a60
5 changed files with 19 additions and 13 deletions

View File

@ -14,4 +14,4 @@ jobs:
uses: ./.github/workflows/build-artifacts-and-run-tests.yml
with:
matrix_all_combinations: true
upload_artifacts: false
artifact_upload_mode: none

View File

@ -10,20 +10,23 @@ on:
type: boolean
required: true
default: true
upload_artifacts:
description: "if built artifacts should be uploaded"
type: boolean
artifact_upload_mode:
description: "Control what artifacts to upload: 'none' for no uploads, 'with_default_features' to upload artifacts with default features (for releases), or 'all' for all feature combinations."
type: choice
options:
- none
- with_default_features
- all
required: true
default: true
workflow_call:
inputs:
matrix_all_combinations:
description: "if matrix should have all combinations of targets and features"
type: boolean
required: true
upload_artifacts:
description: "if built artifacts should be uploaded"
type: boolean
artifact_upload_mode:
description: "Control which artifacts to upload: 'none' for no uploads, 'with_default_features' to upload only artifacts with default features (use_zlib+use_zstd_thin+unrar), or 'all' to upload all feature combinations."
type: string
required: true
jobs:
@ -136,7 +139,10 @@ jobs:
OUCH_ARTIFACTS_FOLDER: artifacts
- name: Upload release artifacts
if: ${{ inputs.upload_artifacts }}
if: |
${{ inputs.artifact_upload_mode != 'none' &&
(inputs.artifact_upload_mode == 'all' ||
(matrix.feature-unrar && matrix.feature-use-zlib && matrix.feature-use-zstd-thin)) }}
uses: actions/upload-artifact@v4
with:
name: ouch-${{ matrix.target }}-${{ steps.concat-features.outputs.FEATURES }}

View File

@ -10,7 +10,7 @@ jobs:
uses: ./.github/workflows/build-artifacts-and-run-tests.yml
with:
matrix_all_combinations: true
upload_artifacts: true
artifact_upload_mode: with_default_features
automated-draft-release:
runs-on: ubuntu-latest

View File

@ -32,4 +32,4 @@ jobs:
uses: ./.github/workflows/build-artifacts-and-run-tests.yml
with:
matrix_all_combinations: false
upload_artifacts: false
artifact_upload_mode: none

4
scripts/package-release-assets.sh Executable file → Normal file
View File

@ -10,8 +10,8 @@ for dir in ouch-*; do
mkdir "$dir/man"
mv "$dir"/completions/*.1 "$dir/man"
cp ../{README.md,LICENSE,CHANGELOG.md} "$dir"
rm -r "$dir/artifacts"
cp ../{README.md,LICENSE,CHANGELOG.md} "$fulldir"
rm -r "$fulldir/artifacts"
if [[ "$dir" = *.exe ]]; then
target=${dir%.exe}