-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from Flow-Launcher/web-components
Implement interactive list of plugins, settings component demo, and visual SettingsTemplate.yaml editor
- Loading branch information
Showing
33 changed files
with
2,981 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,44 @@ | ||
name: Plugin Updater | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- webcomponents/**.js | ||
- webcomponents/**.ts | ||
- webcomponents/**.json | ||
- webcomponents/**.svelte | ||
|
||
jobs: | ||
Update: | ||
build-webcomponents: | ||
name: Build web components | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.UPDATER }} | ||
|
||
- uses: actions/setup-python@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install Dependencies | ||
run: pip install -r ./ci/envs/requirements-plugin.txt | ||
|
||
- name: Update Plugin Informations | ||
run: python ./ci/src/plugin_updater.py | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
REPOSITORY: "Flow-Launcher/Flow.Launcher.PluginsManifest" | ||
PLUGIN_JSON: "plugins.json" | ||
PLUGIN_MARKDOWN: "plugins.md" | ||
PLUGIN_NAME: "Name" | ||
PLUGIN_AUTHOR: "Author" | ||
PLUGIN_DESCRIPTION: "Description" | ||
PLUGIN_VERSION: "Version" | ||
PLUGIN_WEBSITE: "Website" | ||
|
||
- name: Commit & Push changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
node-version: 20 | ||
- name: Get version | ||
id: version | ||
run: | | ||
version=$(jq -r .version webcomponents/package.json) | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
- name: Build | ||
run: | | ||
cd webcomponents | ||
npm install | ||
npm run build | ||
git config --local user.name "github-actions[bot]" | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git add dist | ||
git commit -m "Update web components build artifact" | ||
- name: Put new build into the repo | ||
uses: ad-m/github-push-action@master | ||
with: | ||
commit_message: "DOC: update plugin list" | ||
push_options: --force | ||
branch: main | ||
github_token: ${{ secrets.UPDATER }} | ||
branch: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## SettingsTemplate.yaml editor | ||
|
||
Note that data in the editor below is not persisted. It will be lost once you close your browser. Remember to press "Generate SettingsTemplate.yaml" and save the result if you want to keep it. | ||
|
||
If you already have a SettingsTemplate.yaml file and would like to try editing it here, just copy its contents and paste it on this page. | ||
|
||
<settings-generator></settings-generator> | ||
|
||
<script> | ||
const element = document.querySelector('#__settings-script__'); | ||
if (!element) { | ||
const script = document.createElement('script'); | ||
script.id = '__settings-script__'; | ||
script.src = 'https://www.flowlauncher.com/docs/webcomponents/dist/flow-launcher-docs-web-components.js'; | ||
script.type = 'module'; | ||
document.body.appendChild(script); | ||
} | ||
</script> |
Oops, something went wrong.