summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-01-12 12:53:47 -0500
committerGitHub <noreply@github.com>2023-01-12 17:53:47 +0000
commitff871e626428880017679ca6adffd01bd133e711 (patch)
tree728f49795d5e7a6ecbb76a3eb1a0048e898817dc
parent3713a10b644f3a99207201ba02956f4b3bdc9d1a (diff)
chore(ci): fix canary publish on main (#17374)
Ref #17358
-rw-r--r--.github/workflows/ci.generate.ts20
-rw-r--r--.github/workflows/ci.yml12
2 files changed, 14 insertions, 18 deletions
diff --git a/.github/workflows/ci.generate.ts b/.github/workflows/ci.generate.ts
index 5f2946e36..69b07b7d2 100644
--- a/.github/workflows/ci.generate.ts
+++ b/.github/workflows/ci.generate.ts
@@ -108,13 +108,6 @@ const installDenoStep = {
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",
@@ -335,7 +328,16 @@ const ci = {
if: "matrix.job == 'bench'",
...installNodeStep,
},
- authenticateWithGoogleCloud,
+ {
+ if: [
+ "matrix.profile == 'release' &&",
+ "matrix.job == 'test' &&",
+ "github.repository == 'denoland/deno' &&",
+ "(github.ref == 'refs/heads/main' ||",
+ "startsWith(github.ref, 'refs/tags/'))",
+ ].join("\n"),
+ ...authenticateWithGoogleCloud,
+ },
{
name: "Setup gcloud (unix)",
if: [
@@ -355,8 +357,8 @@ const ci = {
name: "Setup gcloud (windows)",
if: [
"runner.os == 'Windows' &&",
- "matrix.job == 'test' &&",
"matrix.profile == 'release' &&",
+ "matrix.job == 'test' &&",
"github.repository == 'denoland/deno' &&",
"(github.ref == 'refs/heads/main' ||",
"startsWith(github.ref, 'refs/tags/'))",
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ca3430234..79590f062 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -127,13 +127,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
- - name: Authenticate with Google Cloud
- if: |-
+ - if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.profile == 'release' &&
matrix.job == 'test' &&
github.repository == 'denoland/deno' &&
(github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/tags/'))))
+ name: Authenticate with Google Cloud
uses: google-github-actions/auth@v1
with:
project_id: denoland
@@ -154,8 +154,8 @@ jobs:
- name: Setup gcloud (windows)
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.os == 'Windows' &&
- matrix.job == 'test' &&
matrix.profile == 'release' &&
+ matrix.job == 'test' &&
github.repository == 'denoland/deno' &&
(github.ref == 'refs/heads/main' ||
startsWith(github.ref, 'refs/tags/'))))
@@ -552,12 +552,6 @@ jobs:
if: github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'
steps:
- 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/'))
uses: google-github-actions/auth@v1
with:
project_id: denoland