Skip to Content
agore-skill
How-to Guides

How to publish to GitHub

Configure the GitHub publisher and understand gh CLI vs GITHUB_TOKEN fallback.

You have a bundle ready and want the release to appear on GitHub. This page covers the configuration and the two publishing paths — it never runs a publish for you.

Enable the publisher

The publisher list lives in agore.yaml. The default is both publishers:

skill:
  release:
    publishers:
      - type: bundle
      - type: github

With only bundle, release builds artifacts and stops — no upload, which is exactly what --snapshot does anyway. The only valid types are bundle and github; anything else is rejected when the config loads:

agore-skill release
unsupported publisher type "npm" (allowed: bundle, github)

The two publishing paths

release (without --snapshot) tries the paths in this order:

1. The gh CLI, when it is installed and authenticated. The command run is equivalent to:

gh release create diataxis/v1.2.0 \
  dist/diataxis_v1.2.0.zip \
  dist/diataxis_v1.2.0.tar.gz \
  dist/diataxis_v1.2.0_checksums.txt \
  dist/diataxis_v1.2.0_CHANGELOG.md \
  --title "diataxis v1.2.0" \
  --notes-file dist/diataxis_v1.2.0_CHANGELOG.md

2. The GitHub REST API with a token. If gh is not found, the publisher uses the GITHUB_TOKEN environment variable to create the release at POST /repos/<owner>/<repo>/releases and then uploads each of the four files as release assets. If neither gh nor GITHUB_TOKEN exists, the run fails:

agore-skill release
github publisher: gh CLI not found and GITHUB_TOKEN is not set

Both paths upload the same four files from dist/.

Which repository receives the release

The owner/repo slug is derived in this order:

  1. project.repository in agore.yaml
  2. the origin remote of the git repository
  3. the project.name as a last-resort fallback

GitHub remotes in https://github.com/owner/repo, [email protected]:owner/repo and ssh://[email protected]/owner/repo forms are all converted to owner/repo. A non-GitHub repository URL is passed through as-is — set project.repository explicitly if your remote points elsewhere.

Releases from CI

agore-skill init generates .github/workflows/agore-skill.yml, whose release job runs exactly this flow on every v* tag push:

- name: Release skill
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  run: agore-skill release --clean --tag "${GITHUB_REF_NAME}"

In that CI context you can also omit --tag: when GITHUB_REF_TYPE=tag and GITHUB_REF_NAME are set, release reads the tag from the environment.

Do a dry run first

Before any real publish, rehearse with a snapshot — it exercises the same lint gate, exclusion, archive and checksum code paths without touching GitHub:

agore-skill release --skill demo-skill --snapshot --clean

Then verify the artifacts in dist/ (unzip the archive, check the checksum file) before tagging.

On this page