From 07a473c592719c6a8a372f71f64b86d494edc937 Mon Sep 17 00:00:00 2001 From: Mischa Helfenstein Date: Sat, 13 Mar 2021 00:31:09 +0100 Subject: [PATCH 1/2] Remove client secret as it is not needed anymore --- action.yml | 4 ---- entrypoint.sh | 11 +++++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/action.yml b/action.yml index 05aef04..2bfe144 100644 --- a/action.yml +++ b/action.yml @@ -13,9 +13,6 @@ inputs: client-id: description: Token client id required: true - client-secret: - description: Token client secret - required: true file-name: description: Name of zipped target upload file required: true @@ -28,7 +25,6 @@ runs: args: - ${{ inputs.refresh-token }} - ${{ inputs.client-id }} - - ${{ inputs.client-secret }} - ${{ inputs.file-name }} - ${{ inputs.app-id }} - ${{ inputs.publish }} diff --git a/entrypoint.sh b/entrypoint.sh index e283274..3f2b3cc 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,7 +9,6 @@ token=`curl \ -d '{ "refresh_token": "'$1'", "client_id": "'$2'", - "client_secret": "'$3'", "grant_type": "refresh_token" }' \ -X POST \ @@ -24,8 +23,8 @@ status=`curl \ -H "Authorization: Bearer $token" \ -H "x-goog-api-version: 2" \ -X PUT \ --T $4 \ --v https://www.googleapis.com/upload/chromewebstore/v1.1/items/$5 \ +-T $3 \ +-v https://www.googleapis.com/upload/chromewebstore/v1.1/items/$4 \ | \ jq -r '.uploadState'` @@ -34,7 +33,7 @@ then exit 1 fi -if [ $6 == true ] #publish +if [ $5 == true ] #publish then publish=`curl \ --silent \ @@ -43,8 +42,8 @@ then -H "Authorization: Bearer $token" \ -H "x-goog-api-version: 2" \ -X POST \ - -T $4 \ - -v https://www.googleapis.com/upload/chromewebstore/v1.1/items/$5/publish \ + -T $3 \ + -v https://www.googleapis.com/upload/chromewebstore/v1.1/items/$4/publish \ -d publishTarget=default \ | \ jq -r '.publishState'` From 14978d73cdcdd43dc61a750d524dfbf8246f5d5a Mon Sep 17 00:00:00 2001 From: Mischa Helfenstein Date: Sat, 13 Mar 2021 00:32:15 +0100 Subject: [PATCH 2/2] Adapt readme to remove client secret --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 1bee074..7b4f5e3 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,6 @@ It uses the specified refresh token to generate an access token for uploading. Your tokens client id -### `client-secret` - -Your tokens client secret - ### `refresh-token` Google developer refresh token @@ -38,7 +34,6 @@ uses: Klemensas/chrome-extension-upload-action@$VERSION with: refresh-token: 'xxxxxxxxxxxxxxxxxxxxxx' client-id: 'xxxxxxxxxxxxx' - client-secret: 'xxxxxxxxxxxx' file-name: './extension.zip' app-id: 'xzc12xzc21cx23' publish: true