Skip to main content

GitHub Releases

Create GitHub releases with uploaded assets

The release stage creates a GitHub release and uploads all artifacts as assets.

Classification

GroupRequired (default)RollbackToken scope
Assetstruedelete release + delete tag + delete assetscontents:write

See Release resilience for the full classification table and the Submitter gate semantics.

Minimal config

crates:
  - name: myapp
    release:
      github:
        owner: myorg
        name: myapp

If github.owner and github.name are omitted, anodizer auto-detects them from the git remote URL.

Release config fields

FieldTypeDefaultDescription
github.ownerstringauto-detectedGitHub owner/org
github.namestringauto-detectedRepository name
draftboolfalseCreate as draft release
prereleasestring/boolautoMark as prerelease: auto (detect from version), true, false
make_lateststring/boolautoMark as latest: auto, true, false
name_templatestring{{ Tag }}Release title
headerstringnoneText prepended to release body
footerstringnoneText appended to release body
extra_fileslistnoneAdditional files to upload (glob patterns)
skip_uploadboolfalseCreate release without uploading assets
replace_existing_draftboolfalseReplace existing draft release
replace_existing_artifactsboolfalseOverwrite existing assets

Authentication

Set GITHUB_TOKEN as an environment variable or pass it via --token:

export GITHUB_TOKEN="ghp_..."
anodizer release

Draft releases

release:
  draft: true

Prerelease detection

When prerelease: auto (default), anodizer detects prereleases from the version string. Versions like 1.0.0-rc.1, 1.0.0-beta.2 are automatically marked as prereleases.

Extra files

Upload additional files that aren't part of the pipeline:

release:
  extra_files:
    - "dist/completions/*"
    - "docs/man/*.1"

Full example

crates:
  - name: myapp
    release:
      github:
        owner: myorg
        name: myapp
      name_template: "{{ ProjectName }} {{ Version }}"
      header: |
        ## What's Changed
      footer: |
        **Full Changelog**: https://github.com/myorg/myapp/compare/{{ PreviousTag }}...{{ Tag }}
      prerelease: auto
      make_latest: auto