Skip to content

Commit 8042cc5

Browse files
authored
Merge pull request #12 from yinxulai/add_new_models
feat: add version number to package name in release workflow
2 parents 06579bf + 0dceac9 commit 8042cc5

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,27 @@ jobs:
2424
# 复制需要的文件,排除 .git、.github 等不需要的目录
2525
rsync -av --exclude='.git' --exclude='.github' . /tmp/plugin-build/
2626
27+
- name: Extract version from manifest
28+
id: get_version
29+
run: |
30+
VERSION=$(grep '^version:' /tmp/plugin-build/manifest.yaml | sed 's/version: //')
31+
PACKAGE_NAME="qiniu-${VERSION}.difypkg"
32+
echo "version=$VERSION" >> $GITHUB_OUTPUT
33+
echo "package_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
34+
echo "Extracted version: $VERSION"
35+
echo "Package name: $PACKAGE_NAME"
36+
2737
- name: Package plugin
2838
run: |
29-
/tmp/dify-cli/dify-plugin-linux-amd64 plugin package -o qiniu.difypkg /tmp/plugin-build
39+
PACKAGE_NAME="${{ steps.get_version.outputs.package_name }}"
40+
/tmp/dify-cli/dify-plugin-linux-amd64 plugin package -o "$PACKAGE_NAME" /tmp/plugin-build
3041
3142
- name: Upload package to release
3243
uses: actions/upload-release-asset@v1
3344
env:
3445
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3546
with:
3647
upload_url: ${{ github.event.release.upload_url }}
37-
asset_name: qiniu.difypkg
38-
asset_path: ./qiniu.difypkg
48+
asset_name: ${{ steps.get_version.outputs.package_name }}
49+
asset_path: ./${{ steps.get_version.outputs.package_name }}
3950
asset_content_type: application/octet-stream

manifest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ meta:
1717
entrypoint: main
1818
language: python
1919
version: '3.12'
20-
version: 0.0.2
20+
version: 0.0.1
2121
plugins:
2222
models:
2323
- provider/qiniu.yaml
@@ -37,4 +37,4 @@ resource:
3737
tool:
3838
enabled: true
3939
type: plugin
40-
version: 0.1.1
40+
version: 0.1.2

0 commit comments

Comments
 (0)