@@ -83,35 +83,33 @@ jobs:
8383 echo "\\nDirectory structure:"
8484 tree || ls -R
8585
86- - name : Commit package to source repo
86+ - name : Create GitHub Release
8787 env :
88- GITHUB_TOKEN : ${{ secrets.PLUGIN_ACTION }}
88+ GH_TOKEN : ${{ secrets.PLUGIN_ACTION }}
8989 run : |
90- # Create releases directory if it doesn't exist
91- mkdir -p releases
92-
93- # Copy the package file to releases directory
9490 PACKAGE_NAME="${{ steps.get_basic_info.outputs.plugin_name }}-${{ steps.get_basic_info.outputs.version }}.difypkg"
95- cp "$PACKAGE_NAME" releases/
96-
97- # Configure git with token authentication
98- git config user.name "GitHub Actions"
99- git config user.email "[email protected] " 100-
101- # Set up remote URL with token for authentication
102- git remote set-url origin https://x-access-token:${{ secrets.PLUGIN_ACTION }}@github.com/${{ github.repository }}.git
91+ VERSION="${{ steps.get_basic_info.outputs.version }}"
92+ PLUGIN_NAME="${{ steps.get_basic_info.outputs.plugin_name }}"
10393
104- # Add and commit the package file
105- git add releases/"$PACKAGE_NAME"
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"
106111
107- # Check if there are changes to commit
108- if git diff --staged --quiet; then
109- echo "No changes to commit"
110- else
111- git commit -m "add plugin package ${{ steps.get_basic_info.outputs.plugin_name }} v${{ steps.get_basic_info.outputs.version }}"
112- git push origin main
113- echo "Package committed to source repository"
114- fi
112+ echo "Release v$VERSION created successfully with package file"
115113
116114 - name : Checkout target repo
117115 uses : actions/checkout@v4
0 commit comments