mirror of
https://github.com/NomaDamas/k-skill.git
synced 2026-06-24 02:04:11 +00:00
Make Python release workflow plan safely
Move Python package detection into an explicit setup job so GitHub Actions can plan the release workflow instead of failing before jobs/logs are created. Constraint: Python release flow is scaffold-only until a real python-packages/* pyproject exists Rejected: Keeping job-level hashFiles guards | GitHub reported zero-second workflow-file failures with no jobs or logs Confidence: high Scope-risk: narrow Directive: Keep release-please publish work gated behind detected concrete Python package paths Tested: ruby YAML parse; npm run ci Not-tested: actual release-please publication because no Python package exists yet
This commit is contained in:
parent
577091aa44
commit
3f9aee6111
1 changed files with 19 additions and 2 deletions
21
.github/workflows/release-python.yml
vendored
21
.github/workflows/release-python.yml
vendored
|
|
@ -16,14 +16,31 @@ permissions:
|
|||
id-token: write
|
||||
|
||||
jobs:
|
||||
detect_python_packages:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
has_python_packages: ${{ steps.detect.outputs.has_python_packages }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: detect
|
||||
shell: bash
|
||||
run: |
|
||||
if find python-packages -mindepth 2 -maxdepth 2 -name pyproject.toml -print -quit | grep -q .; then
|
||||
echo "has_python_packages=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "has_python_packages=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
scaffold-only:
|
||||
if: ${{ hashFiles('python-packages/**/pyproject.toml') == '' }}
|
||||
needs: detect_python_packages
|
||||
if: ${{ needs.detect_python_packages.outputs.has_python_packages != 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "No Python package exists yet. release-please remains scaffold-only."
|
||||
|
||||
release:
|
||||
if: ${{ hashFiles('python-packages/**/pyproject.toml') != '' }}
|
||||
needs: detect_python_packages
|
||||
if: ${{ needs.detect_python_packages.outputs.has_python_packages == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue