Skip to content

chore(examples): link templates and sync their pinned version on release - #327

Merged
zantvoort merged 2 commits into
mainfrom
docs/example-templates
Jul 25, 2026
Merged

chore(examples): link templates and sync their pinned version on release#327
zantvoort merged 2 commits into
mainfrom
docs/example-templates

Conversation

@zantvoort

Copy link
Copy Markdown
Collaborator

Finishes the template half of #213. The storm new CLI scaffolder is split out into #326.

Changes

  • README / docs: "Use this template" links (with /generate) to the three starter templates, in the examples table and the getting-started guide. Also fixes a stale stack fact for the Ktor example (Ktor DI, not Koin).
  • release.yml: new sync-example-templates job that rewrites only the id("st.orm") version line pinned in each of the five example repos on release, so "Use this template" always starts on the current version. Kotlin / KSP / Ktor toolchain versions are left untouched.

Notes

  • The new job needs RELEASE_TOKEN to have write access to the storm-orm/storm-example-* repos; today it only pushes the framework docs snapshot. Confirm the token scope (or swap in a token/App that can push to those repos) before relying on it.
  • The getting-started.md change surfaces at /docs/next; live /docs/* picks it up at the next release snapshot.

Fixes #213

The storm-example-* repos are GitHub templates (#213). Add "Use this
template" links to the README examples table and the getting-started
guide, and add a release job that rewrites the st.orm plugin version
pinned in each template so a project generated from it starts on the
release. Also correct the Ktor example stack (Ktor DI, not Koin).
Copilot AI review requested due to automatic review settings July 25, 2026 14:36
@zantvoort zantvoort added this to the 1.14.0 milestone Jul 25, 2026
@zantvoort zantvoort added the enhancement New feature or request label Jul 25, 2026
Comment thread .github/workflows/release.yml Fixed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the “template” portion of issue #213 by linking the example repos as GitHub templates in the README/docs and adding a release workflow job to keep those template repos pinned to the newly released Storm Gradle plugin version.

Changes:

  • Add “Use this template” (/generate) links for the three starter templates in README.md and docs/getting-started.md.
  • Update the README example stack description for the Ktor example (Ktor DI instead of Koin).
  • Add a sync-example-templates job to .github/workflows/release.yml to bump the pinned id("st.orm") version in the five example/template repositories on release.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
README.md Updates example stack info and adds “Use this template” links for starter repos.
docs/getting-started.md Adds a prominent “Fastest start” callout linking to template generation.
.github/workflows/release.yml Adds a release job to sync the pinned st.orm plugin version across template repos.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml Outdated
storm-example-kotlin-ktor \
storm-example-kotlin-ktor-graalvm; do
git clone --depth 1 "https://x-access-token:${GH_TOKEN}@github.com/storm-orm/${repo}.git" "$repo"
sed -i -E "s/(id\(\"st\.orm\"\) version \")[0-9]+\.[0-9]+\.[0-9]+/\1${V}/g" "$repo/build.gradle.kts"
Address PR review: replace the whole quoted st.orm version (so any
-SNAPSHOT/-rc suffix is dropped, not just the x.y.z digits), and add
permissions: {} to the sync-example-templates job since it pushes via
RELEASE_TOKEN and never uses the default GITHUB_TOKEN.
Copilot AI review requested due to automatic review settings July 25, 2026 14:41
@zantvoort
zantvoort merged commit 03b1d8c into main Jul 25, 2026
8 checks passed
@zantvoort
zantvoort deleted the docs/example-templates branch July 25, 2026 14:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
V="${{ steps.version.outputs.VERSION }}"
git clone --depth 1 "https://x-access-token:${GH_TOKEN}@github.com/storm-orm/${repo}.git" "$repo"
# Replace the whole quoted version so any -SNAPSHOT/-rc suffix is dropped
# and the template pins the exact release.
sed -i -E "s/(id\(\"st\.orm\"\) version \")[^\"]*(\")/\1${V}\2/g" "$repo/build.gradle.kts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turn the example apps into templates and add a project scaffolder

3 participants