ci: use RELEASE_TOKEN + publish to packages registry

- Release step now authenticates with the RELEASE_TOKEN Actions secret
  (repo write) instead of the automatic token; drop the now-unneeded
  permissions block.
- Add a step that publishes the skill zip to the Gitea generic packages
  registry (cycling-training-skill@<tag>) using the REGISTRY_TOKEN secret,
  handling 200/201/409 responses.
- README: document the registry download URL and both secrets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TqrhBhC3GEcKyaw8RTk8G6
This commit is contained in:
2026-07-20 19:26:43 -04:00
parent 6310b56f26
commit 67d2ba9f91
2 changed files with 40 additions and 12 deletions
+9 -5
View File
@@ -70,6 +70,10 @@ the zip one of two ways, then import it in **Settings → Skills**:
- **From a release:** download `cycling-training-<version>.zip` from the repo's Releases (produced
automatically — see *Packaging & releases* below).
- **From the packages registry:** the same zip is published to the Gitea generic packages registry:
```
https://git.farh.net/api/packages/farhoodlabs/generic/cycling-training-skill/<version>/cycling-training-<version>.zip
```
- **Build it yourself:**
```bash
scripts/build-skill-zip.sh v1.0.0 # -> dist/cycling-training-v1.0.0.zip
@@ -84,14 +88,14 @@ pairs with your connected Intervals.icu MCP server for the live data.
`dist/cycling-training-<version>.zip` (validating that `SKILL.md` carries `name`/`description`
frontmatter). A Gitea Actions workflow, `.gitea/workflows/release-skill.yml`, runs it:
- **Push a tag `v*`** (e.g. `git tag v1.0.0 && git push origin v1.0.0`) → builds the zip and
**attaches it to a Gitea release** for that tag.
- **Push a tag `v*`** (e.g. `git tag v1.0.0 && git push origin v1.0.0`) → builds the zip,
**attaches it to a Gitea release** for that tag, and **publishes it to the packages registry**.
- **Run the workflow manually** (workflow_dispatch) → builds the zip and uploads it as a run
artifact you can download.
The workflow needs a registered Actions runner, Actions enabled for the repo, and the automatic
`GITHUB_TOKEN` to have `contents:write` (granted via the workflow's `permissions` block on
Gitea ≥ 1.20).
The workflow uses two Actions secrets: `RELEASE_TOKEN` (repo write — creates the release and
uploads the asset) and `REGISTRY_TOKEN` (package write — publishes to the generic packages
registry). A registered Actions runner and Actions-enabled repo are also required.
## How to read the docs