发布 Weblate¶
发行周期¶
Weblate's release and support lifecycle is documented in 发行周期.
发布计划¶
即将发布版本的功能是通过 GitHub 里程碑收集的,可以在 <https://github.com/WeblateOrg/weblate/milestones> 上查看路线图。
发布过程¶
发布前要检查的事情:
通过 ./scripts/list-translated-languages.py 来检查新翻译的语言。
由 ./scripts/prepare-release 来设置最终版本。
确保屏幕截图是最新的 make -j 12 -C docs update-screenshots。
合并任何可能挂起的翻译 wlc push; git remote update; git merge origin/weblate
When building distribution packages locally, start from a clean checkout or
remove ignored packaging artifacts such as build/, dist/,
weblate.egg-info/, and generated weblate/locale/**/*.mo files.
执行发布:
创建一个发布 ./scripts/create-release --tag(要求请参见下面)。
Pushing the weblate-<version> tag starts the distribution workflow in
.github/workflows/setup.yml. It builds the package archives, runs
package lint and installation checks using locked dependencies, and prepares
signatures, attestations, release notes, and the SBOM. Publishing jobs download
the validated artifacts instead of rebuilding them. PyPI and GitHub publishing
run independently; check that both jobs succeed before continuing with the
post-release steps.
The GitHub publishing command creates a draft, uploads all release assets, and then publishes it. Do not publish an empty GitHub release before the workflow runs. Published release assets are immutable; see 不可变 GitHub releases.
If publishing fails, inspect both publishing targets before retrying. Remove an incomplete GitHub draft only after inspecting its assets, then rerun the failed publishing job. Correcting assets of a published immutable release requires a new version; do not move or reuse its tag.
手动发布步骤:
关闭 GitHub 里程碑。
一旦检测到 Docker 镜像,则添加标签并推送。
在
.github/workflows/migrations.yml中包含新版本,以便在迁移测试中涵盖它。通过 ./scripts/set-version.py 在仓库中增加版本。
检查 readthedocs.org 是否使用 ./scripts/rtd-projects.py。构建了文档的所有翻译。
要用 ./scripts/create-release 创建标签,你需要:
Repository administrator or organization owner permissions on
WeblateOrg/weblate. Its tag-creation ruleset restricts tag creation to these roles. Tag updates and deletion are blocked even for administrators.Push access to the 测试仓库 repository, where the script also creates a release tag.
A Git signing key configured for git tag -s.
发布配置¶
The repository's pypi environment allows deployments only from tags
matching weblate-*. The weblate project's trusted publisher must
identify the WeblateOrg/weblate repository, the setup.yml workflow
filename, and the pypi environment. Trusted publishing uses GitHub's OpenID
Connect (OIDC) identity instead of a stored PyPI API token. The PyPA publishing
action uploads publish attestations alongside the package files.
These environment restrictions, the PyPI trusted publisher, and GitHub's release-immutability setting are configured outside the checkout. Preserve their matching repository, workflow, and environment settings when renaming or moving the workflow or recreating the repository. See 验证发布工件 for artifact verification.