diff --git a/.github/workflows/all-tests-slow.yml b/.github/workflows/all-tests-slow.yml index 7d090ac..dbf90cf 100644 --- a/.github/workflows/all-tests-slow.yml +++ b/.github/workflows/all-tests-slow.yml @@ -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 diff --git a/.github/workflows/build-artifacts-and-run-tests.yml b/.github/workflows/build-artifacts-and-run-tests.yml index cb3bf30..685a427 100644 --- a/.github/workflows/build-artifacts-and-run-tests.yml +++ b/.github/workflows/build-artifacts-and-run-tests.yml @@ -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 }} diff --git a/.github/workflows/draft-release-automatic-trigger.yml b/.github/workflows/draft-release-automatic-trigger.yml index d0dffe0..929c446 100644 --- a/.github/workflows/draft-release-automatic-trigger.yml +++ b/.github/workflows/draft-release-automatic-trigger.yml @@ -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 diff --git a/.github/workflows/pr-workflow.yml b/.github/workflows/pr-workflow.yml index e804c0c..6ef3cfd 100644 --- a/.github/workflows/pr-workflow.yml +++ b/.github/workflows/pr-workflow.yml @@ -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 diff --git a/scripts/package-release-assets.sh b/scripts/package-release-assets.sh old mode 100755 new mode 100644 index c2e1ba9..0d1c842 --- a/scripts/package-release-assets.sh +++ b/scripts/package-release-assets.sh @@ -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}