diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4770651..d2109d6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,10 +14,10 @@ jobs: name: Test Release Installation strategy: matrix: - swift-version: [ 5.7, 5.8.1 ] + swift-version: [ '5.7', '5.8.1' ] os-version: [ 'ubuntu-22.04' ] include: - - swift-version: 5.6 + - swift-version: '5.6' os-version: ubuntu-20.04 runs-on: ${{ matrix.os-version }} steps: @@ -63,10 +63,10 @@ jobs: name: Test Branch Installation strategy: matrix: - swift-version: [ 5.7, 5.8.1 ] + swift-version: [ '5.7', '5.8.1' ] os-version: [ 'ubuntu-22.04' ] include: - - swift-version: 5.6 + - swift-version: '5.6' os-version: ubuntu-20.04 runs-on: ${{ matrix.os-version }} steps: @@ -114,7 +114,7 @@ jobs: matrix: os-version: [ 'ubuntu-22.04', 'ubuntu-20.04' ] env: - INPUT_SWIFT_VERSION: 5.8 + INPUT_SWIFT_VERSION: '5.8' runs-on: ${{ matrix.os-version }} steps: - uses: actions/checkout@v4 diff --git a/src/main.ts b/src/main.ts index 8284f14..66d64e1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -52,11 +52,14 @@ async function install(installBase: string, branchName: string, versionTag: stri await core.group('Downloading files', async () => { const swiftURL = `https://download.swift.org/${branchName}/${platform.split('.').join('')}/${versionTag}/${versionTag}-${platform}.tar.gz`; core.debug(`Swift Download URL: ${swiftURL}...`) - await Promise.all([ - tools.downloadTool(swiftURL, swiftPkg), - tools.downloadTool(`${swiftURL}.sig`, swiftSig), - tools.downloadTool('https://swift.org/keys/all-keys.asc', allKeysFile), - ]); + let promises: Promise[] = [tools.downloadTool(swiftURL, swiftPkg)]; + if (!skipGPGCheck) { + promises.push( + tools.downloadTool(`${swiftURL}.sig`, swiftSig), + tools.downloadTool('https://www.swift.org/keys/all-keys.asc', allKeysFile), + ); + } + await Promise.all(promises); }); if (!skipGPGCheck) {