From 97cfeccb52870db02fb5c4a2110188ed03781a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wr=C3=B3blewski?= Date: Sat, 31 Aug 2024 19:44:52 +0200 Subject: [PATCH] tool: add publishing to pipeline --- .github/workflows/create_release.yaml | 9 ++++++++- .gitignore | 6 ++++-- Makefile | 15 ++++++++++++++- amo-metadata.json | 17 +++++++++++++++++ src/.web-extension-id | 3 +++ src/manifest.json | 7 ++++++- 6 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 amo-metadata.json create mode 100644 src/.web-extension-id diff --git a/.github/workflows/create_release.yaml b/.github/workflows/create_release.yaml index acb0fbc..80dc702 100644 --- a/.github/workflows/create_release.yaml +++ b/.github/workflows/create_release.yaml @@ -17,4 +17,11 @@ jobs: - name: Release uses: softprops/action-gh-release@v2 with: - files: build.tar.gz + files: | + web-ext-artifacts/build.tar.gz + web-ext-artifacts/build.zip + - name: Publish + env: + ADDONS_MOZ_JWT_ISSUER: ${{ secrets.ADDONS_MOZ_JWT_ISSUER }} + ADDONS_MOZ_JWT_SECRET: ${{ secrets.ADDONS_MOZ_JWT_SECRET }} + run: make publish diff --git a/.gitignore b/.gitignore index e1079e2..404dc44 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .DS_Store -dist.zip -node_modules/ \ No newline at end of file +web-ext-artifacts/ +node_modules/ +build.tar.gz +.amo-upload-uuid \ No newline at end of file diff --git a/Makefile b/Makefile index f54745b..22385f4 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,16 @@ .PHONY: build build: - cd src && tar -czf ../build.tar.gz ./* + web-ext build -s ./src -n build.zip --overwrite-dest + cd src && tar -czf ../web-ext-artifacts/build.tar.gz ./* + +.PHONY: lint +lint: + cd src && web-ext lint + +.PHONY: publish +publish: + web-ext sign \ + --source-dir src \ + --api-key $(ADDONS_MOZ_JWT_ISSUER) --api-secret $(ADDONS_MOZ_JWT_SECRET) \ + --channel listed \ + --amo-metadata ./amo-metadata.json \ No newline at end of file diff --git a/amo-metadata.json b/amo-metadata.json new file mode 100644 index 0000000..22a51b1 --- /dev/null +++ b/amo-metadata.json @@ -0,0 +1,17 @@ +{ + "version": { + "license": "LGPL-3.0-or-later" + }, + "categories": { + "firefox": [ + "other" + ] + }, + "requires_payment": false, + "homepage": { + "en-US": "https://what-to-click.com" + }, + "support_email": { + "en-US": "hey@what-to-click.com" + } +} \ No newline at end of file diff --git a/src/.web-extension-id b/src/.web-extension-id new file mode 100644 index 0000000..01ca335 --- /dev/null +++ b/src/.web-extension-id @@ -0,0 +1,3 @@ +# This file was created by https://github.com/mozilla/web-ext +# Your auto-generated extension ID for addons.mozilla.org is: +{7feef224-a737-4d04-b0c1-ea47d4cad70a} \ No newline at end of file diff --git a/src/manifest.json b/src/manifest.json index 136814e..8f3077c 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "What-to-click", - "version": "1.12.5", + "version": "1.12.6", "description": "Fully offline, AI-powered how-to documentation creator.", "icons": { "48": "icons/record.svg" @@ -39,5 +39,10 @@ "default": "Alt+R" } } + }, + "browser_specific_settings": { + "gecko": { + "id": "{7feef224-a737-4d04-b0c1-ea47d4cad70a}" + } } } \ No newline at end of file