-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bef3b4
commit dffb19c
Showing
5 changed files
with
88 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Pack Community Extension | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'Community/**/manifest.json' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
package-community-extension: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 检出代码 | ||
uses: actions/checkout@v4 | ||
|
||
- name: 设置 Node.js 环境 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'latest' | ||
|
||
- name: 安装必需的工具 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y zip jq | ||
- name: 获取扩展目录列表 | ||
id: get_directories | ||
run: | | ||
# 获取所有扩展的目录 | ||
tree Community | ||
EXT_DIRS=$(find Community -type f -name 'manifest.json' -exec dirname {} \; | sort -u) | ||
echo "EXT_DIRS=$EXT_DIRS" >> $GITHUB_ENV | ||
- name: 打包扩展 | ||
run: | | ||
# 遍历扩展目录并打包 | ||
for dir in $EXT_DIRS; do | ||
echo "Processing $dir" | ||
# 获取扩展的版本号 | ||
VERSION=$(jq -r '.version' "$dir/manifest.json") | ||
echo "[Community Extension] $dir Version: $VERSION" | ||
# 创建一个 zip 包 | ||
zip -r "$dir.zip" "$dir" | ||
done | ||
# 验证 | ||
tree | ||
- name: 上传打包文件 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Community Extensions | ||
path: Community/**/*.zip |
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,21 @@ | ||
# 高亮“广告”扩展 | 社区文档 | ||
|
||
## 前言 | ||
本扩展是以 [MIT](https://github.com/DuckDuckStudio/highlight-ad-extension/blob/main/LICENSE) 许可证开源的,社区可以**在这个扩展的基础上个性化自己的扩展**。例如高亮“知乎盐选”等原本没有的内容也是可以自己加的。如果效果不错还可以直接加到主扩展中! | ||
|
||
### 许可文件说明 | ||
社区扩展不代表我的个人立场,具体以什么许可文件开源也是由社区扩展制作者决定,仓库根目录中的 [MIT](https://github.com/DuckDuckStudio/highlight-ad-extension/blob/main/LICENSE) 许可证仅限于我编写的主扩展。 | ||
|
||
## 对社区扩展的建议 | ||
你可以: | ||
- 在文档中说明你对扩展的修改、以及和主扩展的使用方式有什么区别,方便其他用户使用你的修改版 | ||
- 添加修改版的使用效果截图/视频 | ||
- 将你的社区扩展提交到[主仓库](https://github.com/DuckDuckStudio/highlight-ad-extension)中 | ||
|
||
## 社区扩展列表 | ||
- 添加类 | ||
- [高亮多词](https://github.com/DuckDuckStudio/highlight-ad-extension/tree/main/Community/%E6%B7%BB%E5%8A%A0%E7%B1%BB/%E9%AB%98%E4%BA%AE%E5%A4%9A%E8%AF%8D) | ||
- 修改类 | ||
- 优化类 | ||
- 翻译类 | ||
- ... |