Skip to content

feat(ci): add Test PyPI release workflow for splunk-ao-a2a#57

Open
adityamehra wants to merge 3 commits into
mainfrom
feat/release-splunk-ao-a2a-test-pypi
Open

feat(ci): add Test PyPI release workflow for splunk-ao-a2a#57
adityamehra wants to merge 3 commits into
mainfrom
feat/release-splunk-ao-a2a-test-pypi

Conversation

@adityamehra

Copy link
Copy Markdown
Member

Summary

Adds .github/workflows/release-splunk-ao-a2a-test.yaml — a pipeline that builds and publishes the splunk-ao-a2a package to Test PyPI.

How it works

  • PR push: runs tests → publishes 0.1.0.dev<run_number> to Test PyPI (clean version stays reserved)
  • workflow_dispatch with version: runs tests → publishes the exact version supplied
  • workflow_dispatch without version: runs tests → publishes whatever is in pyproject.toml

Job chain

testbuildpublish (each step gates the next)

Notes

  • All action references pinned to commit SHA (matching ci-tests-splunk-ao-a2a.yaml pattern)
  • Matches the pending Trusted Publisher on test.pypi.org (workflow: release-splunk-ao-a2a-test.yaml, environment: testpypi)
  • Builds with python -m build (hatchling backend)

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
Reject bump keywords (patch, major, etc.) and malformed inputs with a
clear error before any file is modified, matching the pattern added to
the splunk-ao and splunk-ao-adk release workflows

Co-authored-by: Cursor <cursoragent@cursor.com>
@adityamehra

Copy link
Copy Markdown
Member Author

Applied the same changesets from PR #48 to this workflow:

Version input validation — Added a grep -Eq check in the Override version step (manual workflow_dispatch path) that rejects anything that is not an explicit PEP 440 version number. Bump keywords like patch, major, or minor will fail fast with a clear ::error:: message before touching any files. The PR-triggered .dev path is unaffected since it computes the version automatically from pyproject.toml. (SHA pinning was already in place from the initial commit.)

- Fix regex to correctly accept rc, .dev, and .post PEP 440 forms
- Add permissions: contents: read to the test and build jobs

Co-authored-by: Cursor <cursoragent@cursor.com>
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