From 12fb26119edae1919d395b29bd40ecbc76fd7600 Mon Sep 17 00:00:00 2001 From: Burak Karakan Date: Wed, 4 Aug 2021 12:55:06 +0100 Subject: [PATCH 1/4] test and show the listed directories --- .github/workflows/pull-request.yml | 23 ++++++++++++++++++++++- scripts/deploy-chrome.sh | 2 ++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0dc8e75..b79402c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,4 +20,25 @@ jobs: ${{ runner.OS }}- - run: npm ci - run: npm run build - - run: npm run test \ No newline at end of file + - run: npm run test + + deploy-chrome-store: + runs-on: ubuntu-latest + needs: build + # if: (github.event_name == 'create' && github.event.ref_type == 'tag') || (github.event_name == 'release' && github.event.action == 'published') + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2-beta + with: + node-version: '14' + - uses: actions/download-artifact@v2 + with: + name: dist-zip + path: ./dist.zip + - run: npm run deploy-chrome + env: + SOURCE_ZIP: dist.zip + EXTENSION_ID: ${{ secrets.GOOGLE_EXTENSION_ID }} + CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} + CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} + REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }} \ No newline at end of file diff --git a/scripts/deploy-chrome.sh b/scripts/deploy-chrome.sh index d261530..1908525 100755 --- a/scripts/deploy-chrome.sh +++ b/scripts/deploy-chrome.sh @@ -14,6 +14,8 @@ done # install the chrome uploader tool npm install --silent --no-progress -g chrome-webstore-upload-cli +ls -lah + # upload and publish the extension webstore upload \ --source $SOURCE_ZIP \ From 24620ba9eadb9b34a9476c055c8dd6bb55971407 Mon Sep 17 00:00:00 2001 From: Burak Karakan Date: Wed, 4 Aug 2021 13:02:04 +0100 Subject: [PATCH 2/4] try archiving for prs --- .github/workflows/pull-request.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b79402c..25e0b70 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -21,6 +21,11 @@ jobs: - run: npm ci - run: npm run build - run: npm run test + - name: Archive build files for store uploads + uses: actions/upload-artifact@v2 + with: + name: dist-zip + path: dist-zip/dist.zip deploy-chrome-store: runs-on: ubuntu-latest From 17df645fcf568bbda8dbc8559957b65050a5718b Mon Sep 17 00:00:00 2001 From: Burak Karakan Date: Wed, 4 Aug 2021 13:11:17 +0100 Subject: [PATCH 3/4] try listing the artifact --- .github/workflows/pull-request.yml | 2 +- scripts/deploy-chrome.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 25e0b70..8db03a4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -39,7 +39,7 @@ jobs: - uses: actions/download-artifact@v2 with: name: dist-zip - path: ./dist.zip + path: ./dist-zip - run: npm run deploy-chrome env: SOURCE_ZIP: dist.zip diff --git a/scripts/deploy-chrome.sh b/scripts/deploy-chrome.sh index 1908525..7c15177 100755 --- a/scripts/deploy-chrome.sh +++ b/scripts/deploy-chrome.sh @@ -15,6 +15,7 @@ done npm install --silent --no-progress -g chrome-webstore-upload-cli ls -lah +ls dist-zip # upload and publish the extension webstore upload \ From 4d43275ee3c3119f5527185e0496ae11af99ec5d Mon Sep 17 00:00:00 2001 From: Burak Karakan Date: Wed, 4 Aug 2021 13:34:16 +0100 Subject: [PATCH 4/4] try deploying again --- .github/workflows/pull-request.yml | 2 +- scripts/deploy-chrome.sh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8db03a4..a1d0d59 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -39,7 +39,7 @@ jobs: - uses: actions/download-artifact@v2 with: name: dist-zip - path: ./dist-zip + path: . - run: npm run deploy-chrome env: SOURCE_ZIP: dist.zip diff --git a/scripts/deploy-chrome.sh b/scripts/deploy-chrome.sh index 7c15177..d261530 100755 --- a/scripts/deploy-chrome.sh +++ b/scripts/deploy-chrome.sh @@ -14,9 +14,6 @@ done # install the chrome uploader tool npm install --silent --no-progress -g chrome-webstore-upload-cli -ls -lah -ls dist-zip - # upload and publish the extension webstore upload \ --source $SOURCE_ZIP \