summaryrefslogtreecommitdiff
path: root/.github/workflows/publish-firefox.yml
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-03-18 11:29:45 +0900
committerGitHub <noreply@github.com>2023-03-18 11:29:45 +0900
commite7a6f0354b8c38046e449566a371e366ef6b6889 (patch)
treecd3b2b7d30b8dac0ecbd4ebc91b9d1da8da36819 /.github/workflows/publish-firefox.yml
parent0314a8620f952aa5b0129e93f2d0956b0e0cc7c2 (diff)
parent1dd47d0876833c1d61572577ae5b9d2215578c07 (diff)
Merge pull request #92 from themoeway/cd
Add CD to build and publish extension to Chrome & Firefox stores
Diffstat (limited to '.github/workflows/publish-firefox.yml')
-rw-r--r--.github/workflows/publish-firefox.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/publish-firefox.yml b/.github/workflows/publish-firefox.yml
new file mode 100644
index 00000000..7b2037af
--- /dev/null
+++ b/.github/workflows/publish-firefox.yml
@@ -0,0 +1,34 @@
+name: publish-firefox
+on:
+ release:
+ types: [released]
+permissions:
+ contents: read
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ environment: cd
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: robinraju/release-downloader@768b85c8d69164800db5fc00337ab917daf3ce68 # pin@v1.7
+ with:
+ tag: ${{ github.ref_name }}
+ fileName: "*"
+
+ - name: Deploy to Firefox Addons
+ id: addonsDeploy
+ uses: cardinalby/webext-buildtools-firefox-addons-action@924ad87df7e4af50a654c164ad9e498dce260ffa # pin@v1.0.9
+ continue-on-error: true
+ with:
+ zipFilePath: builds/yomitan-firefox.zip
+ extensionId: ${{ secrets.FF_EXTENSION_ID }}
+ jwtIssuer: ${{ secrets.FF_JWT_ISSUER }}
+ jwtSecret: ${{ secrets.FF_JWT_SECRET }}
+
+ - name: Abort on upload error
+ if: |
+ steps.addonsDeploy.outcome == 'failure' &&
+ steps.addonsDeploy.outputs.sameVersionAlreadyUploadedError != 'true' &&
+ steps.addonsDeploy.outputs.timeoutError != 'true'
+ run: exit 1