From 9a4ae00f20dd658b95841e10b7b2976429c7fed7 Mon Sep 17 00:00:00 2001
From: Copilot <223556219+Copilot@users.noreply.github.com>
Date: Wed, 1 Jul 2026 17:41:13 +0200
Subject: [PATCH 1/2] docs: add ready-to-use CI/CD templates for major
platforms
Adds a new guide page with copy-paste semrel release pipeline snippets
for GitHub Actions, GitLab CI, Bitbucket Pipelines, CircleCI, and Travis CI.
Closes #7.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
astro.config.mjs | 1 +
src/content/docs/guide/ci-cd-templates.mdx | 159 +++++++++++++++++++++
2 files changed, 160 insertions(+)
create mode 100644 src/content/docs/guide/ci-cd-templates.mdx
diff --git a/astro.config.mjs b/astro.config.mjs
index a75ba1a..89bfd94 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -252,6 +252,7 @@ export default defineConfig({
{ label: 'Monorepo', link: '/guide/monorepo/' },
{ label: 'Docker', link: '/guide/docker/' },
{ label: 'CI Outputs', link: '/guide/ci-outputs/' },
+ { label: 'CI/CD Templates', link: '/guide/ci-cd-templates/', ...newBadge('2026-07-01') },
{ label: 'Schemas', link: '/guide/schemas/' },
{ label: 'Plugin Development', link: '/guide/plugin-development/' },
],
diff --git a/src/content/docs/guide/ci-cd-templates.mdx b/src/content/docs/guide/ci-cd-templates.mdx
new file mode 100644
index 0000000..eafe04c
--- /dev/null
+++ b/src/content/docs/guide/ci-cd-templates.mdx
@@ -0,0 +1,159 @@
+---
+title: CI/CD Templates
+description: Ready-to-use, copy-paste semrel pipeline templates for GitHub Actions, GitLab CI, Bitbucket Pipelines, CircleCI, and Travis CI.
+---
+
+import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
+
+Copy one of the templates below into your project to get a working semrel release
+pipeline in under a minute. Every snippet triggers on pushes to your default branch
+and runs `semrel release` with sane defaults.
+
+
+
+
+
+
+Uses the [official composite action](https://github.com/SemRels/semrel) — no
+Node.js wrapper, just downloads and builds the Go binary for the runner.
+
+```yaml
+# .github/workflows/release.yml
+name: Release
+
+on:
+ push:
+ branches: [main]
+
+concurrency:
+ group: release
+ cancel-in-progress: false
+
+permissions:
+ contents: write
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - uses: SemRels/semrel@v0
+ id: semrel
+ with:
+ dry-run: 'false'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Use outputs
+ if: steps.semrel.outputs.released == 'true'
+ run: echo "Released ${{ steps.semrel.outputs.version }}"
+```
+
+
+
+
+Uses the [GitLab CI release component](https://github.com/SemRels/condition-gitlab-ci/blob/main/templates/release.yml).
+
+```yaml
+# .gitlab-ci.yml
+include:
+ - remote: 'https://raw.githubusercontent.com/SemRels/condition-gitlab-ci/main/templates/release.yml'
+ inputs:
+ dry_run: "false"
+```
+
+Set a masked, protected `SEMREL_TOKEN` CI/CD variable (Settings → CI/CD → Variables)
+with permission to push tags and create releases.
+
+
+
+
+```yaml
+# bitbucket-pipelines.yml
+image: golang:1.25
+
+pipelines:
+ branches:
+ main:
+ - step:
+ name: Release
+ script:
+ - go install github.com/SemRels/semrel/cmd/semrel@latest
+ - export PATH="$(go env GOPATH)/bin:$PATH"
+ - semrel release
+```
+
+Add `SEMREL_TOKEN` (and any provider-specific secrets) as a **secured** repository
+variable under Repository settings → Pipelines → Repository variables.
+
+
+
+
+```yaml
+# .circleci/config.yml
+version: 2.1
+
+jobs:
+ release:
+ docker:
+ - image: golang:1.25
+ steps:
+ - checkout
+ - run:
+ name: Install semrel
+ command: go install github.com/SemRels/semrel/cmd/semrel@latest
+ - run:
+ name: Run semrel release
+ command: semrel release
+
+workflows:
+ release:
+ jobs:
+ - release:
+ filters:
+ branches:
+ only: main
+```
+
+
+
+
+```yaml
+# .travis.yml
+language: go
+go:
+ - "1.25"
+
+branches:
+ only:
+ - main
+
+install:
+ - go install github.com/SemRels/semrel/cmd/semrel@latest
+
+script:
+ - semrel release
+```
+
+
+
+
+## Common environment variables
+
+All templates read the same [configuration file](/guide/configuration/) and honor
+these environment variables regardless of the CI platform:
+
+| Variable | Description |
+| --- | --- |
+| `SEMREL_TOKEN` | Token used by provider/publisher plugins (create tags, releases, comments) |
+| `SEMREL_DRY_RUN` | Set to `true` to simulate a release without side effects |
+| `SEMREL_CONFIG` | Override the path to `.semrel.yaml` |
+
+See [CI Outputs](/guide/ci-outputs/) for how to consume the computed version, tag,
+and changelog in downstream steps across GitHub Actions and GitLab CI.
From f238b498f44e12615a9c547f4fbffe620bbfa43a Mon Sep 17 00:00:00 2001
From: Markus Waldheim
Date: Wed, 1 Jul 2026 20:19:01 +0200
Subject: [PATCH 2/2] docs: add German translation for CI/CD templates guide
The English page (added in 9a4ae00, closing #7) was never mirrored to
the de/ locale, leaving the German site falling back to an untranslated
page. Adds the German equivalent, mirroring the same content and
internal links (adjusted to /de/ paths) as src/content/docs/guide/ci-cd-templates.mdx.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Markus Waldheim
---
src/content/docs/de/guide/ci-cd-templates.mdx | 160 ++++++++++++++++++
1 file changed, 160 insertions(+)
create mode 100644 src/content/docs/de/guide/ci-cd-templates.mdx
diff --git a/src/content/docs/de/guide/ci-cd-templates.mdx b/src/content/docs/de/guide/ci-cd-templates.mdx
new file mode 100644
index 0000000..174e3bf
--- /dev/null
+++ b/src/content/docs/de/guide/ci-cd-templates.mdx
@@ -0,0 +1,160 @@
+---
+title: CI/CD-Vorlagen
+description: Fertige Copy-paste-Vorlagen für semrel-Release-Pipelines für GitHub Actions, GitLab CI, Bitbucket Pipelines, CircleCI und Travis CI.
+---
+
+import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
+
+Kopiere eine der folgenden Vorlagen in dein Projekt, um in unter einer Minute eine
+funktionierende semrel-Release-Pipeline zu erhalten. Jedes Snippet läuft bei Pushes
+auf deinen Standard-Branch und führt `semrel release` mit sinnvollen Standardwerten aus.
+
+
+
+
+
+
+Verwendet die [offizielle Composite Action](https://github.com/SemRels/semrel) — kein
+Node.js-Wrapper, lädt und baut einfach die Go-Binary für den Runner.
+
+```yaml
+# .github/workflows/release.yml
+name: Release
+
+on:
+ push:
+ branches: [main]
+
+concurrency:
+ group: release
+ cancel-in-progress: false
+
+permissions:
+ contents: write
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - uses: SemRels/semrel@v0
+ id: semrel
+ with:
+ dry-run: 'false'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Use outputs
+ if: steps.semrel.outputs.released == 'true'
+ run: echo "Released ${{ steps.semrel.outputs.version }}"
+```
+
+
+
+
+Verwendet die [GitLab-CI-Release-Komponente](https://github.com/SemRels/condition-gitlab-ci/blob/main/templates/release.yml).
+
+```yaml
+# .gitlab-ci.yml
+include:
+ - remote: 'https://raw.githubusercontent.com/SemRels/condition-gitlab-ci/main/templates/release.yml'
+ inputs:
+ dry_run: "false"
+```
+
+Lege eine maskierte, geschützte `SEMREL_TOKEN`-CI/CD-Variable an (Settings → CI/CD → Variables)
+mit der Berechtigung, Tags zu pushen und Releases zu erstellen.
+
+
+
+
+```yaml
+# bitbucket-pipelines.yml
+image: golang:1.25
+
+pipelines:
+ branches:
+ main:
+ - step:
+ name: Release
+ script:
+ - go install github.com/SemRels/semrel/cmd/semrel@latest
+ - export PATH="$(go env GOPATH)/bin:$PATH"
+ - semrel release
+```
+
+Füge `SEMREL_TOKEN` (sowie eventuelle providerspezifische Secrets) als **gesicherte**
+Repository-Variable unter Repository settings → Pipelines → Repository variables hinzu.
+
+
+
+
+```yaml
+# .circleci/config.yml
+version: 2.1
+
+jobs:
+ release:
+ docker:
+ - image: golang:1.25
+ steps:
+ - checkout
+ - run:
+ name: Install semrel
+ command: go install github.com/SemRels/semrel/cmd/semrel@latest
+ - run:
+ name: Run semrel release
+ command: semrel release
+
+workflows:
+ release:
+ jobs:
+ - release:
+ filters:
+ branches:
+ only: main
+```
+
+
+
+
+```yaml
+# .travis.yml
+language: go
+go:
+ - "1.25"
+
+branches:
+ only:
+ - main
+
+install:
+ - go install github.com/SemRels/semrel/cmd/semrel@latest
+
+script:
+ - semrel release
+```
+
+
+
+
+## Gemeinsame Umgebungsvariablen
+
+Alle Vorlagen lesen dieselbe [Konfigurationsdatei](/de/guide/configuration/) und
+berücksichtigen unabhängig von der CI-Plattform folgende Umgebungsvariablen:
+
+| Variable | Beschreibung |
+| --- | --- |
+| `SEMREL_TOKEN` | Token, das von Provider-/Publisher-Plugins verwendet wird (Tags/Releases erstellen, Kommentare) |
+| `SEMREL_DRY_RUN` | Auf `true` setzen, um ein Release ohne Nebeneffekte zu simulieren |
+| `SEMREL_CONFIG` | Überschreibt den Pfad zu `.semrel.yaml` |
+
+Siehe [CI-Outputs](/de/guide/ci-outputs/) für die Weiterverarbeitung der berechneten
+Version, des Tags und des Changelogs in nachgelagerten Schritten — sowohl für GitHub
+Actions als auch für GitLab CI.