4446658170
CI / Lint, Typecheck & Test (push) Failing after 23s
1. 为CI和release任务添加自定义pyflowx-ci容器并配置UV链接模式 2. 移除冗余的setup-uv和setup-python步骤,合并依赖同步、代码检查命令 3. 简化步骤命名和执行逻辑,统一使用uv管理工具链
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*.*.*']
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
name: Build, Publish & Release
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: pyflowx-ci:latest
|
|
env:
|
|
UV_LINK_MODE: copy
|
|
steps:
|
|
- uses: http://gitea:3000/zhou/checkout.git@v4
|
|
|
|
- name: Build distributions
|
|
run: uv build
|
|
|
|
- name: Publish to PyPI
|
|
uses: http://gitea:3000/zhou/gh-action-pypi-publish.git@release/v1
|
|
with:
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
|
|
- name: Create Gitea Release
|
|
run: |
|
|
VERSION=${GITHUB_REF#refs/tags/v}
|
|
REPO=${GITHUB_REPOSITORY}
|
|
UPLOAD_URL=$(curl -s -X POST "https://git.gookeryoung.cn/api/v1/repos/${REPO}/releases" \
|
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"tag_name\": \"v${VERSION}\", \"name\": \"v${VERSION}\", \"draft\": false, \"prerelease\": false}" \
|
|
| jq -r '.upload_url')
|
|
for file in dist/*; do
|
|
curl -s -X POST "${UPLOAD_URL}?name=$(basename $file)" \
|
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
-H "Content-Type: application/octet-stream" \
|
|
--data-binary @"$file"
|
|
done
|