-
-
Save phucledien/1d31968b29d2e01f4c6b77b502d6fa51 to your computer and use it in GitHub Desktop.
Chrome extension basic pipeline
This file contains hidden or 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