ci: add automated release workflow using Release Please#82
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Release Please-based automation to cut GitHub releases for this Python project, and introduces a CI “summary” job intended to provide a single pass/fail signal for the test matrix.
Changes:
- Add
release-pleaseconfiguration and manifest files for a Python release strategy. - Add a GitHub Actions workflow to run Release Please on pushes to
main. - Add a
test-summaryjob to CI to fail the workflow if thetestjob didn’t succeed.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
release-please-config.json |
Defines Release Please settings for the Python package and changelog path. |
.release-please-manifest.json |
Initializes the manifest version for the root package. |
.github/workflows/release-please.yml |
Adds the Release Please workflow on main pushes. |
.github/workflows/ci.yml |
Adds a test-summary job to aggregate test job status. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| needs: test | ||
| runs-on: ubuntu-latest | ||
| if: always() | ||
| steps: | ||
| - name: All tests passed | ||
| run: | | ||
| if [ "${{ needs.test.result }}" != "success" ]; then | ||
| echo "One or more test matrix jobs failed." | ||
| exit 1 |
There was a problem hiding this comment.
test-summary only depends on test, so failures in lint or types can cause test to be skipped and then this job fails with a misleading message about test matrix failures. If the intent is a single required check, consider adding needs: [lint, types, test] and validating each needs.<job>.result, and/or updating the message to reflect the actual failing/skipped job result(s).
| needs: test | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: All tests passed | |
| run: | | |
| if [ "${{ needs.test.result }}" != "success" ]; then | |
| echo "One or more test matrix jobs failed." | |
| exit 1 | |
| needs: [lint, types, test] | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Check CI job results | |
| run: | | |
| failed=false | |
| message="" | |
| if [ "${{ needs.lint.result }}" != "success" ]; then | |
| failed=true | |
| message="${message}\n- lint: ${{ needs.lint.result }}" | |
| fi | |
| if [ "${{ needs.types.result }}" != "success" ]; then | |
| failed=true | |
| message="${message}\n- types: ${{ needs.types.result }}" | |
| fi | |
| if [ "${{ needs.test.result }}" != "success" ]; then | |
| failed=true | |
| message="${message}\n- test: ${{ needs.test.result }}" | |
| fi | |
| if [ "$failed" = true ]; then | |
| echo "One or more CI jobs did not succeed:" | |
| # Use printf to correctly render newlines in $message | |
| printf "%b\n" "$message" | |
| exit 1 | |
| else | |
| echo "All CI jobs (lint, types, and tests) completed successfully." |
No description provided.