diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-01-12 16:19:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-12 16:19:35 +0100 |
| commit | 1776dca6c784ac399a4414c01ea737171558f809 (patch) | |
| tree | cc7d58cda19c3b5d229cdd960891fcb3bb53dd31 /.github/workflows/ci.generate.ts | |
| parent | 4d66be1e056a2c33e0f793af42d6eb99b7246c1d (diff) | |
ci: update Windows runner, update Google Cloud integration, update Node (#17358)
This commit rolls up following PRs into a single one:
- https://github.com/denoland/deno/pull/16672
- https://github.com/denoland/deno/pull/16674
- https://github.com/denoland/deno/pull/16972
Generation script was updated to take into account these changes.
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Geert-Jan Zwiers <geertjanzwiers@protonmail.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to '.github/workflows/ci.generate.ts')
| -rwxr-xr-x[-rw-r--r--] | .github/workflows/ci.generate.ts | 59 |
1 files changed, 38 insertions, 21 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts index 9dd0b7c97..b5d186164 100644..100755 --- a/.github/workflows/ci.generate.ts +++ b/.github/workflows/ci.generate.ts @@ -7,7 +7,7 @@ const Runners = { "${{ github.repository == 'denoland/deno' && 'ubuntu-20.04-xl' || 'ubuntu-20.04' }}", macos: "macos-12", windows: - "${{ github.repository == 'denoland/deno' && 'windows-2019-xl' || 'windows-2019' }}", + "${{ github.repository == 'denoland/deno' && 'windows-2022-xl' || 'windows-2022' }}", }; const sysRootStep = { @@ -106,6 +106,24 @@ const installDenoStep = { with: { "deno-version": "v1.x" }, }; +const authenticateWithGoogleCloud = { + name: "Authenticate with Google Cloud", + if: [ + "matrix.profile == 'release' &&", + "matrix.job == 'test' &&", + "github.repository == 'denoland/deno' &&", + "(github.ref == 'refs/heads/main' ||", + "startsWith(github.ref, 'refs/tags/'))", + ].join("\n"), + uses: "google-github-actions/auth@v1", + with: { + "project_id": "denoland", + "credentials_json": "${{ secrets.GCP_SA_KEY }}", + "export_environment_variables": true, + "create_credentials_file": true, + }, +}; + function cancelEarlyIfDraftPr( nextSteps: Record<string, unknown>[], ): Record<string, unknown>[] { @@ -306,6 +324,7 @@ const ci = { }, ...installPythonSteps, installNodeStep, + authenticateWithGoogleCloud, { name: "Setup gcloud (unix)", if: [ @@ -316,11 +335,9 @@ const ci = { "(github.ref == 'refs/heads/main' ||", "startsWith(github.ref, 'refs/tags/'))", ].join("\n"), - uses: "google-github-actions/setup-gcloud@v0", + uses: "google-github-actions/setup-gcloud@v1", with: { project_id: "denoland", - service_account_key: "${{ secrets.GCP_SA_KEY }}", - export_default_credentials: true, }, }, { @@ -333,14 +350,12 @@ const ci = { "(github.ref == 'refs/heads/main' ||", "startsWith(github.ref, 'refs/tags/'))", ].join("\n"), - uses: "google-github-actions/setup-gcloud@v0", + uses: "google-github-actions/setup-gcloud@v1", env: { CLOUDSDK_PYTHON: "${{env.pythonLocation}}\\python.exe", }, with: { project_id: "denoland", - service_account_key: "${{ secrets.GCP_SA_KEY }}", - export_default_credentials: true, }, }, { @@ -825,21 +840,23 @@ const ci = { needs: ["build"], if: "github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'", - steps: [{ - name: "Setup gcloud", - uses: "google-github-actions/setup-gcloud@v0", - with: { - project_id: "denoland", - service_account_key: "${{ secrets.GCP_SA_KEY }}", - export_default_credentials: true, + steps: [ + authenticateWithGoogleCloud, + { + name: "Setup gcloud", + uses: "google-github-actions/setup-gcloud@v1", + with: { + project_id: "denoland", + }, + }, + { + name: "Upload canary version file to dl.deno.land", + run: [ + "echo ${{ github.sha }} > canary-latest.txt", + 'gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-latest.txt', + ].join("\n"), }, - }, { - name: "Upload canary version file to dl.deno.land", - run: [ - "echo ${{ github.sha }} > canary-latest.txt", - 'gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-latest.txt', - ].join("\n"), - }], + ], }, }, }; |
