Gitea forbids secret names starting with GITEA_; map the DEPLOY_TOKEN secret to the GITEA_TOKEN env var consumed by publish.sh.
Changesets
This repository uses Changesets to version the OPA
policy packages. Every policies/rules/* and policies/gates/* package is an independent npm
workspace; changesets records which packages changed so versions can be bumped consistently.
Adding a changeset
Run from the repository root:
make changeset
It opens an interactive prompt: select the packages you changed, the bump type (patch for
fixes/behaviour tweaks, minor for new rules, major for breaking input/data contract changes)
and a summary. This writes a file under .changeset/.
Commit the changeset file together with your policy code changes.
Releasing
When changesets are present on main, run:
make version
This applies all changesets, rewrites the version field of affected package.jsons and
regenerates CHANGELOG.md files (formatted with oxfmt). Commit the resulting bump.
Bundles are built from package.json#version, so the registry upload uses the new version.
Gitea Actions
CI verifies (format, lint, schema check, tests) and builds bundles on every push/PR. On main
the publish job uploads the bundles to the Gitea generic package registry using the
DEPLOY_TOKEN repository secret (requires write:package scope). Secret names cannot start
with the reserved GITEA_ prefix.