Skip to content

Commit

Permalink
Workflow to auto build plugin?
Browse files Browse the repository at this point in the history
  • Loading branch information
dmadisetti committed Jul 3, 2023
1 parent 3d63dff commit afe5702
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ done.txt
# Error logs from NVIM_PYTHON_LOG_FILE
*_rplugin
*_py3_script

# ignore
citation_vim_cache
4 changes: 2 additions & 2 deletions firefox/add-on/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "AirLatex.vim",
"version": "1.0",
"icons": {
"48": "icons/icon.png"
"256": "icons/icon.png"
},

"browser_specific_settings": {
Expand All @@ -29,7 +29,7 @@
}
],
"browser_action": {
"default_icon": "icons/message.svg"
"default_icon": "icons/icon.png"
},
"permissions": ["nativeMessaging", "tabs"]
}
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
});
Expand Down

0 comments on commit afe5702

Please sign in to comment.