|
63 | 63 | with: |
64 | 64 | node-version: '20' |
65 | 65 |
|
| 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 | +
|
66 | 82 | - name: Install pnpm |
67 | 83 | run: npm install -g pnpm |
68 | 84 |
|
@@ -113,28 +129,9 @@ jobs: |
113 | 129 |
|
114 | 130 | echo "::notice::Successfully built plugin." |
115 | 131 |
|
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." |
133 | 135 |
|
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 |
139 | 136 |
|
140 | 137 | |
0 commit comments