diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..bb1ce48 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,21 @@ +name: "publish" + +on: +release: + types: [published] + +jobs: + steps: + - name: "Set up env" + uses: dmadisetti/.dots/.github/actions/runner + - run: | + nix run .#_addon + - uses: trmcnvn/firefox-addon@v1 + with: + # uuid is only necessary when updating an existing addon, + # omitting it will create a new addon + uuid: '{e15720cc-a2ad-4df0-9616-db0555357675}' + xpi: addon.xpi + manifest: firefox/add-on/manifest.json + api-key: ${{ secrets.FIREFOX_API_KEY }} + api-secret: ${{ secrets.FIREFOX_API_SECRET }} diff --git a/.gitignore b/.gitignore index 7a308dc..2947996 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ done.txt # Error logs from NVIM_PYTHON_LOG_FILE *_rplugin *_py3_script + +# ignore +citation_vim_cache diff --git a/firefox/add-on/manifest.json b/firefox/add-on/manifest.json index 0dd7530..545b5da 100644 --- a/firefox/add-on/manifest.json +++ b/firefox/add-on/manifest.json @@ -5,7 +5,7 @@ "name": "AirLatex.vim", "version": "1.0", "icons": { - "48": "icons/icon.png" + "256": "icons/icon.png" }, "browser_specific_settings": { @@ -29,7 +29,7 @@ } ], "browser_action": { - "default_icon": "icons/message.svg" + "default_icon": "icons/icon.png" }, "permissions": ["nativeMessaging", "tabs"] } diff --git a/flake.nix b/flake.nix index b4d7595..f25f6a1 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,10 @@ trap cleanup EXIT ${airlatex}/bin/airlatex ''; + _addon = pkgs.writeShellScriptBin "extension" '' + cd firefox/add-on + ${pkgs.zip}/bin/zip -r ../../addon.xpi . + ''; default = airlatex; }; });