Last active
June 24, 2024 13:47
-
-
Save lewisrodgers/dd39d48baf6cb041fd56a3ced01afcf1 to your computer and use it in GitHub Desktop.
Chrome extension basic pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipelines: | |
branches: | |
develop: | |
- step: | |
name: Update | |
script: | |
- apt-get update | |
- apt-get -y install jq zip | |
- FILE_NAME=crx.zip | |
- zip -r $FILE_NAME ./app | |
- ACCESS_TOKEN=$(curl "https://accounts.google.com/o/oauth2/token" -d "client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&refresh_token=$REFRESH_TOKEN&grant_type=refresh_token&redirect_uri=urn:ietf:wg:oauth:2.0:oob" | jq -r '.access_token') | |
- curl -H "Authorization:Bearer $ACCESS_TOKEN" -H "x-goog-api-version:2" -X PUT -T $FILE_NAME -v "https://www.googleapis.com/upload/chromewebstore/v1.1/items/$APP_ID" | |
master: | |
- step: | |
name: Publish to trusted testers | |
script: | |
- apt-get update | |
- apt-get -y install jq zip | |
- FILE_NAME=crx.zip | |
- zip -r $FILE_NAME ./app | |
- ACCESS_TOKEN=$(curl "https://accounts.google.com/o/oauth2/token" -d "client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&refresh_token=$REFRESH_TOKEN&grant_type=refresh_token&redirect_uri=urn:ietf:wg:oauth:2.0:oob" | jq -r '.access_token') | |
- curl -H "Authorization:Bearer $ACCESS_TOKEN" -H "x-goog-api-version:2" -H "Content-Length:0" -H "publishTarget:trustedTesters" -X POST -v "https://www.googleapis.com/chromewebstore/v1.1/items/$APP_ID/publish" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment