From 5ac40b1ba5e7ac897df8d398dcbdc6398db4f987 Mon Sep 17 00:00:00 2001 From: Brian Bjarke Jensen Date: Fri, 10 Jul 2026 14:15:04 +0200 Subject: [PATCH] Publish packages from the release workflow so automated releases reach the registry. Release commits use [skip ci], which prevents publish.yml from running on tag push. Co-authored-by: Cursor --- .gitea/workflows/release.yml | 20 ++++++++++++++++++++ README.md | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 4b8890c..525d0e3 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -74,3 +74,23 @@ jobs: -H "Authorization: token ${CI_RUNNER_TOKEN}" \ -H "Content-Type: application/json" \ -d "$PAYLOAD" + + # Publish here instead of relying on publish.yml tag trigger: release commits use + # [skip ci], which suppresses tag-push workflows, and Gitea does not emit release + # events for releases created by the CI bot account. + - name: Build package + if: steps.meta.outputs.bump != 'skip' + env: + UV_LINK_MODE: copy + UV_INDEX_GITEA_USERNAME: ci-bot + UV_INDEX_GITEA_PASSWORD: ${{ secrets.CI_RUNNER_TOKEN }} + run: | + uv sync --no-dev --frozen + uv build + + - name: Publish to Gitea Package Registry + if: steps.meta.outputs.bump != 'skip' + env: + UV_PUBLISH_TOKEN: ${{ secrets.CI_RUNNER_TOKEN }} + UV_PUBLISH_URL: ${{ vars.REPOSITORY_URL }} + run: uv publish diff --git a/README.md b/README.md index 274efe8..6d66c0a 100644 --- a/README.md +++ b/README.md @@ -198,8 +198,8 @@ Releases are automated when a pull request is merged to `main`. CI reads the **m 1. Open a PR targeting `main` (see [`.gitea/PULL_REQUEST_TEMPLATE.md`](.gitea/PULL_REQUEST_TEMPLATE.md)). 2. If the PR changes files under `python_repositories/`, the title **must** start with a version bump prefix (enforced by CI). -3. On merge, [`release.yml`](.gitea/workflows/release.yml) bumps [`pyproject.toml`](pyproject.toml) and syncs [`uv.lock`](uv.lock), commits, tags `vX.Y.Z`, creates a Gitea release with auto-generated notes, and pushes the tag. -4. [`publish.yml`](.gitea/workflows/publish.yml) builds and publishes the package to the Gitea Package Registry. +3. On merge, [`release.yml`](.gitea/workflows/release.yml) bumps [`pyproject.toml`](pyproject.toml) and syncs [`uv.lock`](uv.lock), commits, tags `vX.Y.Z`, creates a Gitea release with auto-generated notes, pushes the tag, and publishes the package to the Gitea Package Registry. +4. [`publish.yml`](.gitea/workflows/publish.yml) handles manual `v*.*.*` tag pushes only (automated releases publish from `release.yml` because release commits use `[skip ci]`, which suppresses tag-push workflows). Docs-, CI-, and test-only PRs do not need a prefix and will not trigger a release. -- 2.54.0