Skip to content

feat(ci): add centralized reusable CI/CD workflows for the reqstool org#29

Merged
jimisola merged 9 commits into
mainfrom
feat/centralize-reusable-workflows
May 5, 2026
Merged

feat(ci): add centralized reusable CI/CD workflows for the reqstool org#29
jimisola merged 9 commits into
mainfrom
feat/centralize-reusable-workflows

Conversation

@jimisola
Copy link
Copy Markdown
Member

@jimisola jimisola commented May 4, 2026

Summary

Implements reqstool/reqstool.github.io#33 — centralize all GitHub Actions CI/CD workflows so individual repos only maintain thin callers.

Adds 15 reusable workflows organized by language under .github/workflows/:

common/

  • check-release — validates tag format (semver|pep440|maven) and release branch constraint (main, hotfix/*, release/*)
  • release — validates version, generates changelog via git-cliff, creates draft GitHub Release; dry-run input for safe testing
  • release-preview — read-only workflow_dispatch preview: next version, draft notes, commit list, optional build-tool version cross-check
  • publish-to-docker — registry-agnostic GHCR publish with semver tag matrix; dry-run builds without pushing
  • publish-to-github-pages — Antora build + GitHub Pages deploy

java/

  • lintmvn clean validate
  • build-mavenmvn clean verify
  • build-gradle./gradlew clean build
  • publish-to-maven — Maven Central with GPG signing; dry-run runs mvn package only
  • publish-to-gradle — Gradle Plugin Portal or Maven Central via target: portal|central input; dry-run runs ./gradlew build

python/

  • lint — black + flake8; package-manager: hatch|poetry input
  • build-hatch — hatch pytest + build; coverage-source input
  • build-poetry — poetry pytest + build; install-self-as-plugin input for plugin e2e tests
  • publish-to-python — PyPI via OIDC trusted publishing, attestations: true; dry-run runs twine check
  • publish-to-python-test — Test PyPI; dry-run runs twine check

typescript/

  • lintnpm run lint + npm run format
  • build — npm test + build; use-xvfb input for VS Code extension tests; dependency-version/dependency-install-command inputs for bundled tool pinning
  • publish-to-npm — scoped npm publish; dry-run uses --dry-run
  • publish-to-vscode — Open VSX Registry via HaaLeo action; dry-run mode; generic dependency-version/dependency-name inputs

Also adds:

  • .github/cliff.toml — org-wide default changelog config (per-repo overrides via cliff-config input)
  • tests/ — 1:1 mirror of workflow directory with act-compatible test workflows and JSON event fixtures for failure-path testing of check-release
  • ci.yml — runs actionlint, zizmor, yamllint, and act-based behavioral tests on any change to .github/workflows/** or tests/**

Closes

reqstool/reqstool.github.io#33 (Phase 1 — centralized workflows)

Test plan

  • ci.yml triggers on this PR and passes lint + check-release matrix
  • After merge, open reqstool-vscode migration PR as first end-to-end smoke test

Implements reqstool/reqstool.github.io#33.

Adds 10 reusable workflows organized by language under .github/workflows/:
- common/: check-release, release, release-preview, publish-to-docker
- java/: publish-to-maven, publish-to-gradle (target: portal|central)
- python/: publish-to-python, publish-to-python-test
- typescript/: publish-to-npm, publish-to-vscode

All publish workflows support a dry-run input for CI-safe validation
without uploading to external registries.

release-preview.yml computes the next version via git-cliff and
optionally cross-checks it against the calling repo's build tool via
a version-command input.

Adds tests/ mirroring the workflow directory structure (1:1 file
mapping) with act-compatible test workflows and JSON event fixtures for
failure-path testing of check-release.yml.

Adds ci.yml that runs actionlint, zizmor, yamllint, and act-based
behavioral tests on any change to .github/workflows/** or tests/**.

Adds .github/cliff.toml as the org-wide default changelog config.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/ci.yml Fixed
jimisola added 2 commits May 4, 2026 11:23
…typescript

Adds reusable build and lint workflows alongside the existing publish/release
workflows, completing the org-wide CI/CD centralization.

New workflows:
- java/lint.yml       — mvn clean validate; java-version input
- java/build-maven.yml — mvn clean verify; java-version input
- java/build-gradle.yml — ./gradlew clean build; java-version input
- python/lint.yml     — black + flake8; package-manager: hatch|poetry input
- python/build-hatch.yml — hatch pytest + build; coverage-source input
- python/build-poetry.yml — poetry install + pytest + build; install-self-as-plugin
  input for plugin e2e tests
- typescript/lint.yml — npm ci + lint + format; node-version input
- typescript/build.yml — npm ci + test + build; use-xvfb and
  dependency-version/install-command inputs for VS Code extension builds

Adds 1:1 test files in tests/ for all new workflows (actionlint-validated;
act execution requires a real project checkout so ci.yml skips act for
build/lint tests).

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Centralizes the identical Antora build + GitHub Pages deploy workflows
from reqstool-java-annotations and reqstool-java-maven-plugin.

Inputs: node-version (default 24), antora-playbook (default docs/antora-playbook.yml).
Callers pass permissions: pages: write, id-token: write.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola changed the title feat(ci): add centralized reusable release and publish workflows feat(ci): add centralized reusable CI/CD workflows for the reqstool org May 4, 2026
jimisola added 4 commits May 4, 2026 18:58
- check-release: replace [[ != glob ]] with case statement (SC2193)
- release, release-preview, ci: group multiple >> redirects into
  { ... } >> file blocks (SC2129)
- build-poetry: replace ls dist/*.whl with find (SC2012)
- publish-to-vscode: replace ls *.vsix with find -maxdepth 1 (SC2012, SC2035)

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
act was showing a Docker image selection prompt and receiving EOF
when run non-interactively, causing all test jobs to fail.

Pre-creating ~/.config/act/actrc with node:20-bullseye-slim
(sufficient for shell-only workflows) resolves this.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
act's --input flag only works for workflow_dispatch events; for
workflow_call the inputs must be embedded in the event JSON payload
under an 'inputs' key.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
act does not propagate with: inputs into nested workflow_call, causing
false failures. release-preview also uses curl which is absent from the
micro image. Both are validated by actionlint; end-to-end testing
happens in the per-repo migration PRs.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Comment thread .github/workflows/ci.yml Fixed
…mat script

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Addresses CodeQL findings — all jobs only read the repository,
so contents: read is the correct minimal permission.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola enabled auto-merge (squash) May 5, 2026 06:59
@jimisola jimisola self-assigned this May 5, 2026
@jimisola jimisola disabled auto-merge May 5, 2026 07:20
@jimisola jimisola enabled auto-merge (squash) May 5, 2026 07:20
@jimisola jimisola disabled auto-merge May 5, 2026 07:20
@jimisola jimisola merged commit 73f4169 into main May 5, 2026
22 checks passed
@jimisola jimisola deleted the feat/centralize-reusable-workflows branch May 5, 2026 07:20
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.

2 participants