Skip to content

plugin: add onebot_test #2

plugin: add onebot_test

plugin: add onebot_test #2

name: Upload Merged Plugin
on:
pull_request:
types: [closed]
branches:
- main
- dev
paths-ignore:
- ".github/**"
- ".gitignore"
- "unpacked_plugin/**"
- "README.md"
- "LICENSE"
env:
REPO_NAME: langgenius/dify-plugins
jobs:
upload-merged-plugin:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Plugin Daemon
env:
GH_TOKEN: ${{ secrets.ORG_SCOPE_GITHUB_TOKEN }}
run: |
gh release download -R langgenius/dify-plugin-daemon --pattern "dify-plugin-linux-amd64" --dir .scripts
chmod +x .scripts/dify-plugin-linux-amd64
- name: Clone Marketplace Toolkit
env:
GH_TOKEN: ${{ secrets.ORG_SCOPE_GITHUB_TOKEN }}
run: |
gh repo clone https://github.com/langgenius/dify-marketplace-backend -- -b deploy/dev
cp -r dify-marketplace-backend/toolkit/* .scripts/
rm -rf dify-marketplace-backend
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12.7
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Get PR Path
env:
GH_TOKEN: ${{ secrets.ORG_SCOPE_GITHUB_TOKEN }}
run: |
export PR_FILES=$(gh pr view -R ${{ env.REPO_NAME }} ${{ github.event.pull_request.number }} --json files --jq .files)
if PLUGIN_PATH=$(python3 .scripts/validator/check-pkg-paths.py); then
echo $PLUGIN_PATH
echo "PLUGIN_PATH=$PLUGIN_PATH" >> $GITHUB_ENV
else
echo "Only one .difypkg file change is allowed in a single PR."
exit 1
fi
- name: Upload Plugin
run: |
python3 .scripts/uploader/upload-package.py -p ${{ env.PLUGIN_PATH }} -t ${{ secrets.MARKETPLACE_TOKEN }} --plugin-daemon-path .scripts/dify-plugin-linux-amd64 -u ${{ secrets.MARKETPLACE_BASE_URL }} -f