Installation
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Prerequisites
Section titled “Prerequisites”- Git ≥ 2.30
- A repository that uses Conventional Commits
Install
Section titled “Install”No installation needed. Pull the official image and run:
docker pull ghcr.io/semrels/semrel:latest-alpinedocker run --rm \ -v "$(pwd):/workspace" -w /workspace \ -e GITHUB_TOKEN="$GITHUB_TOKEN" \ ghcr.io/semrels/semrel:latest-alpine release --dry-runThe alpine variant bundles git and ca-certificates — everything semrel needs.
See Docker guide for image variants and version pinning.
go install github.com/SemRels/semrel/cmd/semrel@latestRequires Go ≥ 1.22. The binary is placed in $GOPATH/bin (usually ~/go/bin).
Download the pre-built binary for your platform from GitHub Releases and place it somewhere on your $PATH:
# Linux / macOS (example for v0.2.0, amd64)curl -L https://github.com/SemRels/semrel/releases/download/v0.2.0/semrel_0.2.0_linux_amd64.tar.gz \ | tar xz semrelmv semrel /usr/local/bin/chmod +x /usr/local/bin/semrelgit clone https://github.com/SemRels/semrel.gitcd semrelgo build -o semrel ./cmd/semrelmv semrel /usr/local/bin/Verify
Section titled “Verify”semrel --versionExpected output:
semrel version v0.2.0CI / CD
Section titled “CI / CD”The simplest approach — use semrel as a Docker container action. No Go toolchain required, just a checkout and the semrel step:
name: Release
on: push: branches: [main]
permissions: contents: write
jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0
- name: Run semrel uses: docker://ghcr.io/semrels/semrel:latest-alpine with: args: release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Or run semrel in a container job (useful when subsequent steps also need it):
jobs: release: runs-on: ubuntu-latest container: image: ghcr.io/semrels/semrel:latest-alpine steps: - uses: actions/checkout@v4 with: fetch-depth: 0
- name: Run semrel run: semrel release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Set the semrel image on your release job — GitLab CI runs it as the container:
semrel: image: ghcr.io/semrels/semrel:latest-alpine stage: release rules: - if: $CI_COMMIT_BRANCH == "main" script: - semrel release --gitlab-dotenv semrel.env artifacts: reports: dotenv: semrel.envThe dotenv artifact exposes SEMREL_VERSION, SEMREL_TAG, and SEMREL_CHANGELOG to downstream jobs automatically.
See CI Outputs guide for details.
Install semrel via Go toolchain if you prefer a non-Docker setup:
- uses: actions/setup-go@v5 with: go-version: '1.22'
- name: Install semrel run: go install github.com/SemRels/semrel/cmd/semrel@latest
- name: Run semrel run: semrel release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Use the alpine image as the executor:
version: 2.1jobs: release: docker: - image: ghcr.io/semrels/semrel:latest-alpine steps: - checkout - run: name: Run semrel command: semrel releaseworkflows: release: jobs: - release: filters: branches: only: mainUse the alpine image in a declarative pipeline:
// Jenkinsfilepipeline { agent { docker { image 'ghcr.io/semrels/semrel:latest-alpine' args '-v $HOME/.gitconfig:/root/.gitconfig:ro' } } stages { stage('Release') { when { branch 'main' } steps { sh 'semrel release' } } }}Installing plugins from the registry
Section titled “Installing plugins from the registry”When a plugin is referenced by name and no matching binary is available locally, semrel can resolve it through the SemRels Plugin Registry.
The flow looks like this:
- semrel checks the local plugin directory first.
- If the binary is missing, semrel fetches registry metadata from
registry.semrel.io(MVP: GitHub Pages-backedplugins.json). - It downloads the platform-specific release asset for the current OS and architecture.
- It verifies the downloaded file against the published SHA-256 checksum.
- It caches the registry metadata and binary for reuse on later runs.
By default, the registry metadata cache lives under .semrel/registry-cache, while downloaded binaries are reused from the local .semrel/ cache layout. Local binaries still take precedence, which keeps CI predictable and allows offline reuse after the first successful download.
# Optional registry overridesexport SEMREL_REGISTRY_URL=https://registry.semrel.ioexport SEMREL_CACHE_DIR=.semrelexport SEMREL_CACHE_TTL=24hFor more detail, see the Plugin Registry overview and the Plugin Publishing Guide.
Shell completion
Section titled “Shell completion”Auto-completion scripts can be generated for bash, zsh, fish, and PowerShell:
# bashsemrel completion bash > /etc/bash_completion.d/semrel
# zshsemrel completion zsh > "${fpath[1]}/_semrel"
# fishsemrel completion fish | source