diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0dc8e75..a1d0d59 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,4 +20,30 @@ jobs: ${{ runner.OS }}- - run: npm ci - run: npm run build - - run: npm run test \ No newline at end of file + - 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 + 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: . + - 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