From 52b8e57fc76ee473ce18fd24f968cef1f304a73a Mon Sep 17 00:00:00 2001 From: cheney Date: Tue, 21 Jul 2026 14:41:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20cicd=20=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 74 ++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e9a9b78..7a3e5a3 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -1,34 +1,40 @@ -name: TDevOPsCICD - -on: [push] - -jobs: - build-image: - runs-on: workbench - steps: - - uses: https://gitea.com/actions/checkout@v4 - - name: Build Binary - env: - OBJECT_TOKEN: ${{ secrets.OBJECT_TOKEN }} # 需要在Gitea项目设置中配置的密钥 - GITEA_BASE_URL: http://git.honor3.com # 你的Gitea实例地址 - PACKAGE_OWNER: Fullstack # 仓库所有者用户名 - REPO_NAME: kit.program # 仓库名 - PACKAGE_NAME: kit - PACKAGE_VERSION: ${{ github.ref_name }} # 使用分支名或标签作为版本 - run: | - echo ---------------------------------------- - echo ${{ github.ref_name }} ${{ github.sha }} - bun -v - ping -c 3 git.honor3.com - cd kit - bun i - bun run windows - curl -X POST \ - -H "Authorization: token $OBJECT_TOKEN" \ - -F "data=@./dist/windows/kit.exe" \ - "$GITEA_BASE_URL/api/packages/$PACKAGE_OWNER/generic/$REPO_NAME/$PACKAGE_VERSION/kit.exe" - bun run linux - curl -X POST \ - -H "Authorization: token $OBJECT_TOKEN" \ - -F "data=@./dist/linux/kit" \ - "$GITEA_BASE_URL/api/packages/$PACKAGE_OWNER/generic/$REPO_NAME/$PACKAGE_VERSION/kit" \ No newline at end of file +name: TDevOPsCICD + +on: [push] + +jobs: + build-image: + runs-on: ubuntu-latest + steps: + - uses: https://gitea.com/actions/checkout@v4 + - name: Setup Bun + run: | + curl -fsSL https://bun.sh/install | bash + export BUN_INSTALL="$HOME/.bun" + export PATH="$BUN_INSTALL/bin:$PATH" + echo "BUN_INSTALL=$HOME/.bun" >> $GITHUB_ENV + echo "$HOME/.bun/bin" >> $GITHUB_PATH + - name: Build Binary + env: + OBJECT_TOKEN: ${{ secrets.OBJECT_TOKEN }} + GITEA_BASE_URL: http://git.honor3.com + PACKAGE_OWNER: Fullstack + REPO_NAME: kit.program + PACKAGE_NAME: kit + PACKAGE_VERSION: ${{ github.ref_name }} + run: | + echo ---------------------------------------- + echo ${{ github.ref_name }} ${{ github.sha }} + bun -v + cd kit + bun i + bun run windows + curl -X POST \ + -H "Authorization: token $OBJECT_TOKEN" \ + -F "data=@./dist/windows/kit.exe" \ + "$GITEA_BASE_URL/api/packages/$PACKAGE_OWNER/generic/$REPO_NAME/$PACKAGE_VERSION/kit.exe" + bun run linux + curl -X POST \ + -H "Authorization: token $OBJECT_TOKEN" \ + -F "data=@./dist/linux/kit" \ + "$GITEA_BASE_URL/api/packages/$PACKAGE_OWNER/generic/$REPO_NAME/$PACKAGE_VERSION/kit"