|
41 | 41 | FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true |
42 | 42 | ENABLE_NUGET: 'true' |
43 | 43 | NUGET_USE_OIDC: 'false' |
| 44 | + ENABLE_INSTALLERS: 'true' |
44 | 45 | ENABLE_ANDROID: 'false' |
45 | 46 | ENABLE_IOS: 'false' |
46 | 47 |
|
@@ -187,11 +188,12 @@ jobs: |
187 | 188 | run: | |
188 | 189 | IS_RELEASE="${{ steps.resolve.outputs.is_release }}" |
189 | 190 | PACK=$( [ "$ENABLE_NUGET" = "true" ] && echo "true" || echo "false" ) |
| 191 | + PUBLISH=$( [ "$ENABLE_INSTALLERS" = "true" ] && echo "true" || echo "false" ) |
190 | 192 |
|
191 | 193 | if [ "$IS_RELEASE" = "true" ]; then |
192 | | - ENTRIES="{\"os\":\"ubuntu-latest\",\"runtime\":\"linux-x64\",\"pack\":$PACK,\"publish\":true,\"workloads\":\"\"}" |
193 | | - ENTRIES+=",{\"os\":\"windows-latest\",\"runtime\":\"win-x64\",\"pack\":false,\"publish\":true,\"workloads\":\"\"}" |
194 | | - ENTRIES+=",{\"os\":\"macos-latest\",\"runtime\":\"osx-arm64\",\"pack\":false,\"publish\":true,\"workloads\":\"\"}" |
| 194 | + ENTRIES="{\"os\":\"ubuntu-latest\",\"runtime\":\"linux-x64\",\"pack\":$PACK,\"publish\":$PUBLISH,\"workloads\":\"\"}" |
| 195 | + ENTRIES+=",{\"os\":\"windows-latest\",\"runtime\":\"win-x64\",\"pack\":false,\"publish\":$PUBLISH,\"workloads\":\"\"}" |
| 196 | + ENTRIES+=",{\"os\":\"macos-latest\",\"runtime\":\"osx-arm64\",\"pack\":false,\"publish\":$PUBLISH,\"workloads\":\"\"}" |
195 | 197 |
|
196 | 198 | if [ "$ENABLE_ANDROID" = "true" ]; then |
197 | 199 | ENTRIES+=',{"os":"ubuntu-latest","runtime":"android","pack":false,"publish":false,"workloads":"android"}' |
@@ -444,6 +446,7 @@ jobs: |
444 | 446 | path: artifacts/packages |
445 | 447 |
|
446 | 448 | - name: Download installers |
| 449 | + if: env.ENABLE_INSTALLERS == 'true' |
447 | 450 | uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
448 | 451 | with: |
449 | 452 | path: artifacts/installers |
@@ -534,9 +537,11 @@ jobs: |
534 | 537 | SUBJECTS+="$f"$'\n' |
535 | 538 | done |
536 | 539 | fi |
537 | | - for f in artifacts/installers/*.zip; do |
538 | | - SUBJECTS+="$f"$'\n' |
539 | | - done |
| 540 | + if [ "$ENABLE_INSTALLERS" = "true" ]; then |
| 541 | + for f in artifacts/installers/*.zip; do |
| 542 | + SUBJECTS+="$f"$'\n' |
| 543 | + done |
| 544 | + fi |
540 | 545 | SUBJECTS=$(echo "$SUBJECTS" | sed '/^$/d') |
541 | 546 | echo "subjects<<EOF" >> "$GITHUB_OUTPUT" |
542 | 547 | echo "$SUBJECTS" >> "$GITHUB_OUTPUT" |
@@ -583,27 +588,26 @@ jobs: |
583 | 588 | TAG="${{ needs.resolve-version.outputs.tag }}" |
584 | 589 | RELEASE_NAME="dotnet.CI.template $TAG" |
585 | 590 |
|
586 | | - shopt -s nullglob |
587 | | - RELEASE_FILES=(artifacts/installers/*.zip) |
588 | | - if [ ${#RELEASE_FILES[@]} -eq 0 ]; then |
589 | | - echo "::error::No installer zip files found" |
590 | | - exit 1 |
591 | | - fi |
592 | | -
|
593 | 591 | if gh release view "$TAG" >/dev/null 2>&1; then |
594 | 592 | echo "::error::Release already exists for tag $TAG" |
595 | 593 | exit 1 |
596 | 594 | fi |
597 | 595 |
|
598 | | - SBOM_FILE="" |
| 596 | + shopt -s nullglob |
| 597 | + RELEASE_ASSETS=() |
| 598 | +
|
| 599 | + if [ "$ENABLE_INSTALLERS" = "true" ]; then |
| 600 | + RELEASE_ASSETS+=(artifacts/installers/*.zip) |
| 601 | + fi |
| 602 | +
|
599 | 603 | if [ -f "sbom-spdx.json" ]; then |
600 | | - SBOM_FILE="sbom-spdx.json" |
| 604 | + RELEASE_ASSETS+=(sbom-spdx.json) |
601 | 605 | fi |
602 | 606 |
|
603 | | - gh release create "$TAG" "${RELEASE_FILES[@]}" $SBOM_FILE \ |
| 607 | + gh release create "$TAG" "${RELEASE_ASSETS[@]}" \ |
604 | 608 | --title "$RELEASE_NAME" \ |
605 | 609 | --generate-notes |
606 | | - echo "Created release $TAG with ${#RELEASE_FILES[@]} assets" |
| 610 | + echo "Created release $TAG with ${#RELEASE_ASSETS[@]} assets" |
607 | 611 |
|
608 | 612 | deploy-docs: |
609 | 613 | name: Deploy Documentation |
|
0 commit comments