Skip to content

Add reusable release workflows (slice #4) - #2

Merged
pbujna-apius merged 1 commit into
mainfrom
slice-4-release-workflows
Jul 20, 2026
Merged

Add reusable release workflows (slice #4)#2
pbujna-apius merged 1 commit into
mainfrom
slice-4-release-workflows

Conversation

@pbujna-apius

Copy link
Copy Markdown
Contributor

Implements slice #4 (apius-tech/splunk-app-standards#5): the reusable release workflows for the Apius Splunk CI standard.

What

  • prepare-release.yml (workflow_call; inputs version, app_id) — stamps app.conf [launcher] version and root pyproject.toml [project].version to the target version via splunk_app_ci stamp (module sourced the same way as app-ci.yml), commits the two files onto a release/vX.Y.Z branch, and opens a "Release vX.Y.Z" PR against main. Never writes main directly; opening the PR runs the normal gate.
  • release.yml (workflow_call; inputs app_id, version, cloud_gate=false; secrets SPLUNK_USER/SPLUNK_PASS) — packages the app at the released version, runs Splunk AppInspect via the AppInspect API (splunk/appinspect-api-action@v3.0.5), then publishes a GitHub Release with dist/*.tar.gz + auto-generated notes. Splunkbase upload is out of scope (slice #6).
  • README — documents both workflows and the human release flow.

AppInspect advisory-cloud (ADR-0005)

appinspect-api-action v3 dropped the failOn* inputs (failOnError is hardcoded true). To get "base blocks, cloud advisory" the vetting runs as two steps:

  • base: excluded_tags: "manual,cloud" — blocks on error/failure;
  • cloud: included_tags: cloud with continue-on-error: ${{ !inputs.cloud_gate }} — advisory by default, blocking when cloud_gate=true.

Verified locally

  • All workflow YAML parses with yaml.safe_load.
  • stamp and package CLIs run against a fresh apius_lang_entropy checkout: both source files stamp to the version and the package builds with app.conf stamped inside. ruff check/format clean.

Not verified (needs a human-approved run post-merge)

  • Tag-triggered publish and the AppInspect API credential path (require an outward-facing tag push / GitHub Release, reserved for the first human-run release).
  • The caller prepare-release workflow_dispatch is only dispatchable once the caller file is on the default branch.

Notes

  • Callers pin @main for now (no v1 tag cut yet), per the README guidance; repin to @v1 once released.
  • prepare-release needs the repo setting "Allow GitHub Actions to create and approve pull requests" enabled.

Implements slice #4 of the Apius Splunk CI standard: the DECIDED commit-back
release-PR flow (ADR-0004) plus tag-triggered publish (ADR-0004/ADR-0005).

prepare-release.yml (workflow_call; inputs version, app_id):
- Stamps app.conf [launcher] version and root pyproject.toml [project].version
  to the target version via `python -m splunk_app_ci stamp`, sourcing the
  packaging module the same way app-ci.yml does (checkout splunk-app-ci into
  .splunk-app-ci, run under PYTHONPATH=.splunk-app-ci).
- Commits only the two stamped files onto a release/vX.Y.Z branch and opens a
  "Release vX.Y.Z" PR against main. Never writes to main directly; opening the
  PR runs the normal PR gate. Needs contents:write + pull-requests:write.

release.yml (workflow_call; inputs app_id, version, cloud_gate=false; secrets
SPLUNK_USER/SPLUNK_PASS):
- Builds the Splunkbase package at the released version into dist/.
- Runs Splunk AppInspect via the AppInspect API (splunk/appinspect-api-action
  @v3.0.5). Base (non-cloud) checks run with excluded_tags "manual,cloud" and
  BLOCK on errors (the action hardcodes failOnError=true). Cloud checks run
  with included_tags cloud in a separate step made ADVISORY via step-level
  continue-on-error: ${{ !inputs.cloud_gate }}, so cloud findings only block
  when cloud_gate=true. This two-step split is required because v3 of the
  action dropped the failOn* inputs.
- Publishes a GitHub Release for the pushed tag with dist/*.tar.gz and
  auto-generated notes (gh release create --generate-notes). Splunkbase upload
  is out of scope (slice #6); the workflow stops after the Release step.

README: document the two workflows and the human release flow
(prepare-release -> merge Release PR -> push tag vX.Y.Z -> release publishes),
with caller snippets and the "Allow Actions to create PRs" repo-setting note.
@pbujna-apius
pbujna-apius merged commit 091b804 into main Jul 20, 2026
1 check passed
@pbujna-apius
pbujna-apius deleted the slice-4-release-workflows branch July 20, 2026 10:41
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.

1 participant