Skip to content

Commit 6f4ad1f

Browse files
committed
Use the release domain name
1 parent 1c89330 commit 6f4ad1f

File tree

2 files changed

+15
-27
lines changed

2 files changed

+15
-27
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,12 +1019,15 @@ jobs:
10191019
env:
10201020
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10211021
run: |
1022-
function Upload_File_To_Release([string]$InputFile, [string]$OutputName) {
1023-
mv "${InputFile}" "${OutputName}"
1024-
gh release upload ${{ needs.context.outputs.swift_tag }} "${OutputName}" -R ${{ github.repository }}
1022+
function upload_installer() {
1023+
local input_file=$1
1024+
local output_name=$2
10251025
1026-
shasum -a 256 "${OutputName}" > "${OutputName}.sha256"
1027-
gh release upload ${{ needs.context.outputs.swift_tag }} "${OutputName}.sha256" -R ${{ github.repository }}
1026+
mv "${input_file}" "${output_name}"
1027+
gh release upload ${{ needs.context.outputs.swift_tag }} "${output_name}" -R ${{ github.repository }}
1028+
1029+
shasum -a 256 "${output_name}" > "${output_name}.sha256"
1030+
gh release upload ${{ needs.context.outputs.swift_tag }} "${output_name}.sha256" -R ${{ github.repository }}
10281031
}
10291032
10301033
branch_version_string=${{ inputs.swift_version || '0.0.0' }}
@@ -1038,21 +1041,7 @@ jobs:
10381041
gh release create ${{ needs.context.outputs.swift_tag }} -R ${{ github.repository }} --latest=${latest}
10391042
10401043
# Upload all installer variants
1041-
Upload_File_To_Release "${{ github.workspace }}/tmp/online/amd64/installer.exe" "installer-amd64.exe"
1042-
Upload_File_To_Release "${{ github.workspace }}/tmp/online/arm64/installer.exe" "installer-arm64.exe"
1043-
Upload_File_To_Release "${{ github.workspace }}/tmp/offline/amd64/installer.exe" "installer-offline-amd64.exe"
1044-
Upload_File_To_Release "${{ github.workspace }}/tmp/offline/arm64/installer.exe" "installer-offline-arm64.exe"
1045-
1046-
binary-size:
1047-
needs: [context, release]
1048-
if: inputs.create_release == true
1049-
name: Record Swift Toolchain Binary Sizes
1050-
permissions:
1051-
contents: read
1052-
id-token: write
1053-
uses: ./.github/workflows/release-swift-toolchain-binary-sizes.yml
1054-
with:
1055-
toolchain_version: ${{ needs.context.outputs.swift_tag }}
1056-
dry_run: false
1057-
secrets:
1058-
SWIFT_TOOLCHAIN_UPLOADER_ROLE_ARN: ${{ secrets.SWIFT_TOOLCHAIN_UPLOADER_ROLE_ARN }}
1044+
upload_installer "${{ github.workspace }}/tmp/online/amd64/installer.exe" "installer-amd64.exe"
1045+
upload_installer "${{ github.workspace }}/tmp/online/arm64/installer.exe" "installer-arm64.exe"
1046+
upload_installer "${{ github.workspace }}/tmp/offline/amd64/installer.exe" "installer-offline-amd64.exe"
1047+
upload_installer "${{ github.workspace }}/tmp/offline/arm64/installer.exe" "installer-offline-arm64.exe"

.github/workflows/swift-toolchain.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5123,7 +5123,7 @@ jobs:
51235123
if ("${{ inputs.build_android }}" -eq "true") {
51245124
$Platforms=@("android") + $Platforms
51255125
}
5126-
$BaseReleaseDownloadUrl = "https://pub-3a06d9ae9ab6469198a3cf59c7d6bdce.r2.dev/${{ steps.generate-base-release-download-prefix.outputs.url_prefix }}"
5126+
$BaseReleaseDownloadUrl = "https://swift-toolchain.thebrowserco.com/${{ steps.generate-base-release-download-prefix.outputs.url_prefix }}"
51275127
51285128
msbuild -nologo -restore -maxCpuCount `
51295129
/t:rebuild `
@@ -5132,7 +5132,7 @@ jobs:
51325132
-p:BuildProjectReferences=false `
51335133
-p:SignOutput=${{ inputs.signed }} `
51345134
-p:CERTIFICATE=${env:CERTIFICATE} `
5135-
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
5135+
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `Pz
51365136
-p:BundleFlavor=online `
51375137
-p:BaseReleaseDownloadUrl=$BaseReleaseDownloadUrl `
51385138
-p:Platforms="`"$($Platforms -Join ';')`"" `
@@ -5197,7 +5197,6 @@ jobs:
51975197
name: Windows-${{ inputs.build_arch }}-installer-${{ inputs.release && 'online' || 'offline' }}
51985198
path: ${{ github.workspace }}/tmp
51995199

5200-
52015200
# TODO(compnerd): migrate this to compnerd/gha-setup-swift after the work that @mangini is doing is completed
52025201
- run: |
52035202
function Update-EnvironmentVariables {
@@ -5262,7 +5261,7 @@ jobs:
52625261
with:
52635262
name: Windows-${{ inputs.build_arch }}-installer-${{ inputs.release && 'online' || 'offline' }}
52645263
path: ${{ github.workspace }}/tmp
5265-
5264+
52665265
# TODO(compnerd): migrate this to compnerd/gha-setup-swift after the work that @mangini is doing is completed
52675266
- name: Install Swift SDK
52685267
run: |

0 commit comments

Comments
 (0)