Skip to content

Commit

Permalink
chore: add app id annotation (#17)
Browse files Browse the repository at this point in the history
* chore: add app id annotation

Signed-off-by: Ryan Wang <[email protected]>
  • Loading branch information
ruibaby authored Sep 19, 2023
1 parent 9658e83 commit 879f574
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,27 @@ jobs:
release_id: releaseId,
name: artifactName,
data: await fs.readFile(artifactPathName)
});
});
app-store-release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Download plugin-sitemap jar
uses: actions/download-artifact@v2
with:
name: plugin-sitemap
path: build/libs
- name: Sync to Halo App Store
uses: halo-sigs/app-store-release-action@main
with:
github-token: ${{secrets.GITHUB_TOKEN}}
app-id: ${{secrets.APP_ID}}
release-id: ${{ github.event.release.id }}
assets-dir: "build/libs"
halo-username: ${{ secrets.HALO_USERNAME }}
halo-password: ${{ secrets.HALO_PASSWORD }}
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# plugin-sitemap

Halo 2.0 的站点 Sitemap 链接生成插件。
Halo 2.0 的站点 Sitemap 链接生成插件

安装插件之后会提供一个 `http://your-host/sitemap.xml` 的链接作为站点的 Sitemap。

## 使用方式

1. 下载,目前提供以下两个下载方式:
- GitHub Releases:访问 [Releases](https://github.com/halo-sigs/plugin-sitemap/releases) 下载 Assets 中的 JAR 文件。
- Halo 应用市场:<https://halo.run/store/apps/app-QDFMI>
2. 插件安装和更新方式可参考:<https://docs.halo.run/user-guide/plugins>

## 开发环境

Expand All @@ -17,19 +26,7 @@ cd path/to/plugin-sitemap
```

```bash
# macOS / Linux
./gradlew pnpmInstall

# Windows
./gradlew.bat pnpmInstall
```

```bash
# macOS / Linux
./gradlew build

# Windows
./gradlew.bat build
```

修改 Halo 配置文件:
Expand All @@ -46,9 +43,3 @@ halo:
fixedPluginPath:
- "/path/to/plugin-sitemap"
```
## 使用方式
1. 在 [Releases](https://github.com/halo-sigs/plugin-sitemap/releases) 下载最新的 JAR 文件。
2. 在 Halo 后台的插件管理上传 JAR 文件进行安装。
3. 启动插件之后,即可通过 `https://your-host/sitemap.xml` 来访问站点地图。
4 changes: 4 additions & 0 deletions src/main/resources/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: plugin.halo.run/v1alpha1
kind: Plugin
metadata:
name: PluginSitemap
annotations:
# Add supports for Halo App Store
# https://halo.run/store/apps/app-QDFMI
"store.halo.run/app-id": "app-QDFMI"
spec:
enabled: true
version: 1.0.2
Expand Down

0 comments on commit 879f574

Please sign in to comment.