From 98ba4a13dc9d3317351c0c549a94d017ee48d6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=9C=E4=BA=91?= Date: Fri, 26 Sep 2025 16:48:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(ci):=20=E6=B7=BB=E5=8A=A0=E5=9F=BA?= =?UTF-8?q?=E4=BA=8E=E6=A0=87=E7=AD=BE=E7=9A=84=E8=87=AA=E5=8A=A8=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建了在打标签时触发的 Gitea 工作流 - 实现了代码检出和文件列表步骤 - 添加了将项目文件打包为 ZIP 的功能 - 配置了向私有注册表发布包的步骤 - 使用环境变量传递版本号和认证信息 - 添加了工作流状态输出便于调试追踪 --- .gitea/workflows/publish_on_tagged.yml | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .gitea/workflows/publish_on_tagged.yml diff --git a/.gitea/workflows/publish_on_tagged.yml b/.gitea/workflows/publish_on_tagged.yml new file mode 100644 index 0000000..33caf21 --- /dev/null +++ b/.gitea/workflows/publish_on_tagged.yml @@ -0,0 +1,28 @@ +name: Release development version to registry +on: + push: + tags: + - '**.**' + +jobs: + Publish on Tagged: + runs-on: ubuntu-latest + steps: + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - name: Zip files in the repository + run: | + apt-get update + apt-get install zip + zip -r dist.zip * + - name: Publish to registry + run: | + curl --user ch4o5:4fd300672472e666014314c1c94c604c634165a9 \ + --upload-file ./dist.zip \ + https://nest.doylee.cn/api/packages/HDK/composer?version=${{ gitea.ref_name }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file