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