Skip to content

Commit 5d39967

Browse files
committed
Merge branch 'taichuy_dev'
2 parents 77d73d7 + 6aa6f6c commit 5d39967

File tree

3 files changed

+43
-16
lines changed

3 files changed

+43
-16
lines changed

.github/workflows/plugin-publish.yml

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
jobs:
99
auto_pr:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
actions: read
1115
steps:
1216
- name: Checkout code
1317
uses: actions/checkout@v4
@@ -79,6 +83,34 @@ jobs:
7983
echo "\\nDirectory structure:"
8084
tree || ls -R
8185
86+
- name: Create GitHub Release
87+
env:
88+
GH_TOKEN: ${{ secrets.PLUGIN_ACTION }}
89+
run: |
90+
PACKAGE_NAME="${{ steps.get_basic_info.outputs.plugin_name }}-${{ steps.get_basic_info.outputs.version }}.difypkg"
91+
VERSION="${{ steps.get_basic_info.outputs.version }}"
92+
PLUGIN_NAME="${{ steps.get_basic_info.outputs.plugin_name }}"
93+
94+
# Create release with the packaged file
95+
gh release create "v$VERSION" \
96+
--repo ${{ github.repository }} \
97+
--title "$PLUGIN_NAME v$VERSION" \
98+
--notes "Release $PLUGIN_NAME plugin version $VERSION
99+
100+
## Changes
101+
- Updated plugin package to version $VERSION
102+
- Ready for deployment to Dify Marketplace
103+
104+
## Installation
105+
Download the \`.difypkg\` file and install it in your Dify instance.
106+
107+
## Files
108+
- \`$PACKAGE_NAME\` - Plugin package file" \
109+
--latest \
110+
"$PACKAGE_NAME"
111+
112+
echo "Release v$VERSION created successfully with package file"
113+
82114
- name: Checkout target repo
83115
uses: actions/checkout@v4
84116
with:
@@ -98,26 +130,29 @@ jobs:
98130
echo "Debug: Package name: $PACKAGE_NAME"
99131
ls -la
100132
101-
# Move the packaged file to the target directory using variables
102-
mkdir -p dify-plugins/${{ steps.get_basic_info.outputs.org_name }}/${{ steps.get_basic_info.outputs.plugin_name }}
103-
mv "$PACKAGE_NAME" dify-plugins/${{ steps.get_basic_info.outputs.org_name }}/${{ steps.get_basic_info.outputs.plugin_name }}/
104-
105-
# Enter the target repository directory
133+
# Enter the target repository directory first
106134
cd dify-plugins
107135
108136
# Configure git
109137
git config user.name "GitHub Actions"
110138
git config user.email "[email protected]"
111139
112-
# Ensure we are on the latest main branch
140+
# Ensure we are on the latest main branch and clean working directory
113141
git fetch origin main
114142
git checkout main
115143
git pull origin main
144+
145+
# Clean any untracked files that might conflict
146+
git clean -fd
116147
117148
# Create and switch to a new branch using variables and new naming convention
118149
BRANCH_NAME="bump-${{ steps.get_basic_info.outputs.plugin_name }}-plugin-${{ steps.get_basic_info.outputs.version }}"
119150
git checkout -b "$BRANCH_NAME"
120151
152+
# Now move the packaged file to the target directory using variables
153+
mkdir -p ${{ steps.get_basic_info.outputs.org_name }}/${{ steps.get_basic_info.outputs.plugin_name }}
154+
mv "../$PACKAGE_NAME" ${{ steps.get_basic_info.outputs.org_name }}/${{ steps.get_basic_info.outputs.plugin_name }}/
155+
121156
# Add and commit changes (using git add .)
122157
git add .
123158
git status # for debugging

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dify SSE 请求工具插件
22

33
**Author:** lw
4-
**Version:** 0.0.1
4+
**Version:** 0.0.3
55
**Type:** tool
66

77
## 📖 描述
@@ -144,14 +144,6 @@ URL: https://your-log-server.com/logs/stream
144144
最大持续时间: 600
145145
```
146146

147-
## 🧪 测试
148-
149-
运行测试示例:
150-
151-
```bash
152-
cd examples
153-
python test_sse.py
154-
```
155147

156148
## 🤝 贡献
157149

manifest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.0.2
1+
version: 0.0.3
22
type: plugin
33
author: tdcktz
44
name: sse_request_tool

0 commit comments

Comments
 (0)