File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -112,3 +112,29 @@ jobs:
112112 zip -r "$id.zip" .
113113
114114 echo "::notice::Successfully built plugin."
115+
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 [YOUR_PROJECT_ID]
133+
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://[YOUR_BUCKET_NAME]/path/in/bucket/
139+
140+
You can’t perform that action at this time.
0 commit comments