Skip to content

Commit 10edcb9

Browse files
committed
fix: Fix CI
1 parent 150172c commit 10edcb9

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,22 @@ jobs:
6363
with:
6464
node-version: '20'
6565

66+
- name: Install Google Cloud SDK
67+
run: |
68+
sudo apt-get update
69+
sudo apt-get install apt-transport-https ca-certificates gnupg curl
70+
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
71+
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
72+
sudo apt-get update && sudo apt-get install google-cloud-cli
73+
74+
- name: Authenticate to Google Cloud
75+
env:
76+
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
77+
run: |
78+
echo "${GCP_SERVICE_ACCOUNT_KEY}" > gcloud-key.json
79+
gcloud auth activate-service-account --key-file=gcloud-key.json
80+
gcloud config set project steam-brew
81+
6682
- name: Install pnpm
6783
run: npm install -g pnpm
6884

@@ -113,28 +129,9 @@ jobs:
113129
114130
echo "::notice::Successfully built plugin."
115131
116-
# Step 2: Set up Google Cloud SDK
117-
- name: Install Google Cloud SDK
118-
run: |
119-
sudo apt-get update
120-
sudo apt-get install apt-transport-https ca-certificates gnupg curl
121-
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
122-
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
123-
sudo apt-get update && sudo apt-get install google-cloud-cli
124-
125-
# Step 3: Authenticate with the Service Account
126-
- name: Authenticate to Google Cloud
127-
env:
128-
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
129-
run: |
130-
echo "${GCP_SERVICE_ACCOUNT_KEY}" > gcloud-key.json
131-
gcloud auth activate-service-account --key-file=gcloud-key.json
132-
gcloud config set project steam-brew
132+
echo "::notice::Uploading plugin to Google Cloud Storage..."
133+
gsutil cp "$id.zip" gs://steam-brew.firebasestorage.app/plugins"$id.zip"
134+
echo "::notice::Successfully uploaded plugin to Google Cloud Storage."
133135
134-
# Step 4: Upload a file to GCS
135-
- name: Upload file to GCS
136-
run: |
137-
echo "This is a test file" > test-file.txt
138-
gsutil cp test-file.txt gs://steam-brew.firebasestorage.app/test-file.txt
139136
140137

0 commit comments

Comments
 (0)