Skip to content

Add release workflow for sample apps + Refactor repo - #4

Merged
brionmario merged 1 commit into
thunder-id:mainfrom
brionmario:ci/release-workflow
Oct 13, 2026
Merged

brionmario merged 1 commit into
thunder-id:mainfrom
brionmario:ci/release-workflow

Conversation

@brionmario

@brionmario brionmario commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Purpose

Adds a manually triggered release workflow that publishes each sample app as a ready-to-run source zip on GitHub Releases. It mirrors the javascript-sdks release workflow, but also works for samples that aren't npm-based, like the Flutter one.

This PR also adds the repo's pull request template and a root README.md, both following thunder-id/javascript-sdks. It also moves the samples from samples/<category>/<name>/ to <category>/<name>/ at the repo root, since the repo already holds only samples.

Approach

Release workflow (.github/workflows/release.yml)

It runs on workflow_dispatch with these inputs:

  • bump_type: patch, minor or major. A major bump also needs confirm_major ticked.
  • One checkbox per sample: sample_flutter_app_auth and sample_self_care_account.

Each selected sample runs as its own job, and the jobs run concurrently:

  1. Bump version: updates the version in the sample's own version file.
  2. Commit, tag & push: commits [Release] <category>/<name>@<version>, pushes using the same rebase-and-retry loop as javascript-sdks, then creates the tag sample/<category>/<name>/v<version>.
  3. Pack sample: builds thunderid-<category>-<name>-sample-v<version>.zip.
  4. Create GitHub Release: attaches the zip, with generated notes.

To add a sample: add a sample_<x> checkbox input, copy one of the release job blocks, and change its path, tag and title.

Composite actions

  • .github/actions/bump-version bumps the version for the sample's stack, replacing the npm-only pnpm version:
    • package.json: runs npm version <type> --no-git-tag-version.
    • pubspec.yaml: bumps the version number and increments the +N build number, which becomes the Android versionCode and the iOS build number.
    • Anything else fails with a clear error. To support a new stack, add a branch here.
  • .github/actions/pack-sample zips the sample with git archive at the release commit, replacing pnpm pack.
    • Only committed files are included, so .env, node_modules, build/ and dist/ are left out.
    • A sample can exclude more files with export-ignore in .gitattributes.

PR template and README

  • .github/pull_request_template.md is copied from thunder-id/javascript-sdks. I left out the "Cross-SDK parity" item because this repo has no parity check.
  • README.md follows the javascript-sdks README: the repo banner, a table of samples with a release badge per sample, and the same contributing and license sections. Each badge shows "no matching releases found" until that sample's first release.

Sample layout

Samples now sit at <category>/<name>/ at the repo root, e.g. self-care/account and integrations/flutter-app-auth. The extra samples/ folder repeated the repo name; javascript-sdks only has one to keep samples apart from packages/.

Requirement: the THUNDERID_AUTOMATION_BOT secret must be set on this repo. The workflow uses it to push to main and to create releases.

Related Issues

Related PRs

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
    • Ran the bump and pack scripts locally on fresh clones:

      Sample Bump Result
      account patch 1.0.0 → 1.0.1
      account minor 1.0.0 → 1.1.0
      flutter-app-auth patch 1.0.0+1 → 1.0.1+2
      flutter-app-auth major 1.0.0+1 → 2.0.0+2
    • Each zip has a single top-level folder and includes the bumped version file. It leaves out .env, node_modules and build.

    • An unsupported bump type fails with a clear error, and so does a folder with no version file.

    • Not yet done: a full run on GitHub, which needs the secret configured first.

  • Documentation provided. (Add links if there are any)
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards.
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Add a manually triggered release workflow that publishes each sample app
as a source zip on GitHub Releases, mirroring the javascript-sdks release
workflow while supporting samples that aren't npm-based.

- Add the release workflow with a bump type dropdown, a confirm_major
  guard and one checkbox per sample.
- Add bump-version and pack-sample composite actions that bump
  package.json or pubspec.yaml versions and zip committed sample files
  with git archive.
- Move samples from samples/<category>/<name>/ to <category>/<name>/ at
  the repo root and update PR builder discovery.
- Add the pull request template and a README with the repo banner and
  the list of samples.

Signed-off-by: Brion <info@brionmario.com>
@brionmario
brionmario merged commit a7e7271 into thunder-id:main Oct 13, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a release workflow to thunder-id/samples

2 participants