From 01b3be9c3b10c501f589dd25aa37fff9a3bb845a Mon Sep 17 00:00:00 2001 From: inson1 <75314629+inson1@users.noreply.github.com> Date: Fri, 17 Nov 2023 07:59:32 +0100 Subject: [PATCH 1/3] Create publish.yml --- .github/workflows/publish.yml | 63 +++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b198952 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,63 @@ +name: Publish to stores - Chrome Web Store, Firefox store, Edge store + +on: + release: + types: [created] + +env: + FILE_PATH: ./dist/file.zip xxxxxxxxxxxxxxxxxxxxxxxxx + + CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }} + CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }} + CHROME_CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }} + CHROME_REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }} + + FIREFOX_UUID: ${{ secrets.FIREFOX_UUID }} + FIREFOX_AUTH_API_ISSUER: ${{ secrets.FIREFOX_AUTH_API_ISSUER }} + FIREFOX_AUTH_API_SECRET: ${{ secrets.FIREFOX_AUTH_API_SECRET }} + + EDGE_PRODUCT_ID: ${{ secrets.EDGE_PRODUCT_ID }} + EDGE_CLIENT_ID: ${{ secrets.EDGE_CLIENT_ID }} + EDGE_CLIENT_SECRET: ${{ secrets.EDGE_CLIENT_SECRET }} + EDGE_ACCESS_TOKEN_URL: ${{ secrets.EDGE_ACCESS_TOKEN_URL }} + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 20 + + - name: Build + run: | + npm ci xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + npm run build xxxxxxxxxxxxxxxxxxxxxxxxxxx + + - name: Publish to Chrome Web Store + uses: mnao305/chrome-extension-upload@v4.0.1 + with: + file-path: FILE_PATH + extension-id: CHROME_EXTENSION_ID + client-id: CHROME_CLIENT_ID + client-secret: CHROME_CLIENT_SECRET + refresh-token: CHROME_REFRESH_TOKEN + + - name: Publish to Firefox store + uses: browser-actions/public-firefox-addon@latest + with: + addon-id: FIREFOX_UUID + addon-path: FILE_PATH + auth-api-issuer: FIREFOX_AUTH_API_ISSUER + auth-api-secret: FIREFOX_AUTH_API_SECRET + + - name: Publish to Edge store + uses: hocgin/action-edge-addone-upload@main + with: + product_id: EDGE_PRODUCT_ID + client_id: EDGE_CLIENT_ID + client_secret: EDGE_CLIENT_SECRET + access_token_url: EDGE_ACCESS_TOKEN_URL + addone_file: FILE_PATH From 06a135cb4283d2d6388a64b1831587b163af5e54 Mon Sep 17 00:00:00 2001 From: inson1 <75314629+inson1@users.noreply.github.com> Date: Fri, 17 Nov 2023 08:45:32 +0100 Subject: [PATCH 2/3] Update publish.yml --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b198952..246f138 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -33,8 +33,8 @@ jobs: - name: Build run: | - npm ci xxxxxxxxxxxxxxxxxxxxxxxxxxxxx - npm run build xxxxxxxxxxxxxxxxxxxxxxxxxxx + npm ci + npm run build - name: Publish to Chrome Web Store uses: mnao305/chrome-extension-upload@v4.0.1 From 73668825d1596f934b19a8d2e1146e908194fa6f Mon Sep 17 00:00:00 2001 From: inson1 <75314629+inson1@users.noreply.github.com> Date: Fri, 17 Nov 2023 08:46:14 +0100 Subject: [PATCH 3/3] Update publish.yml --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 246f138..e414002 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ on: types: [created] env: - FILE_PATH: ./dist/file.zip xxxxxxxxxxxxxxxxxxxxxxxxx + FILE_PATH: ./dist/sessionic.zip CHROME_EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }} CHROME_CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}