From d8a1883cad73a24164fe5e6d0f32697cb0c8a147 Mon Sep 17 00:00:00 2001 From: James Maa Date: Tue, 20 Aug 2024 11:49:36 -0700 Subject: [PATCH] Add publish to Microsoft CI Github Action (#1314) * Add publish to Microsoft CI * Test workflow by triggering on push * Remove maxAttempt * Use chrome zip for testing * Testing: hardcode tag name * Remove test code * Remove orphaned result * Remove edge dev build --- .github/workflows/publish-edge.yml | 27 +++++++++++++++++++++++++++ .github/workflows/release.yml | 6 ++++++ dev/data/manifest-variants.json | 8 ++++++++ 3 files changed, 41 insertions(+) create mode 100644 .github/workflows/publish-edge.yml diff --git a/.github/workflows/publish-edge.yml b/.github/workflows/publish-edge.yml new file mode 100644 index 0000000000..57b263d774 --- /dev/null +++ b/.github/workflows/publish-edge.yml @@ -0,0 +1,27 @@ +name: publish-edge +on: workflow_dispatch +permissions: + contents: read +jobs: + upload-on-webstore: + runs-on: ubuntu-latest + environment: cd + outputs: + result: ${{ steps.webStorePublish.outcome }} + permissions: + actions: write + steps: + - uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # pin@v1.11 + with: + tag: ${{ github.ref_name }} + fileName: "*" + + - name: Publish on Microsoft Edge Addons + uses: wdzeng/edge-addon@v1 + id: webStorePublish + with: + product-id: 18e6c4cd-6383-4f38-95e9-92a629f60817 + zip-path: yomitan-edge.zip + client-id: ${{ secrets.EDGE_CLIENT_ID }} + client-secret: ${{ secrets.EDGE_CLIENT_SECRET }} + access-token-url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1e76ba9bc..6a50e8c7f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,3 +23,9 @@ jobs: workflow: publish-firefox token: ${{ secrets.GITHUB_TOKEN }} wait-for-completion: false + + - name: Dispatch publish-edge + uses: aurelien-baudet/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7 # pin@v2 + with: + workflow: publish-edge + wait-for-completion: false diff --git a/dev/data/manifest-variants.json b/dev/data/manifest-variants.json index 3c29996528..95e1957e54 100644 --- a/dev/data/manifest-variants.json +++ b/dev/data/manifest-variants.json @@ -371,6 +371,14 @@ "js/background/offscreen.js", "js/background/offscreen-main.js" ] + }, + { + "name": "edge", + "inherit": "base", + "fileName": "yomitan-edge.zip", + "excludeFiles": [ + "background.html" + ] } ] }