Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Move publish step into release-please workflow #237

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

mansenfranzen
Copy link
Owner

@mansenfranzen mansenfranzen commented Mar 26, 2024

Type

enhancement


Description

  • Move the publish step into the release-please workflow
  • Remove the push event trigger for tags
  • Remove the steps for building and publishing to PyPI
  • Add a new job for publishing to PyPI
  • Add a dependency on the release-please job
  • Set up the environment for the new job
  • Conditionally run the new job based on the release-please job output
  • Add steps for checking out code, setting up Python, building, and publishing to PyPI

Changes walkthrough

Relevant files
Enhancement
publish.yml
Move publish step into release-please workflow and remove PyPI
publishing

.github/workflows/publish.yml
['Move the publish step into the release-please workflow', 'Remove the push event trigger for tags', 'Remove the steps for building and publishing to PyPI']

+0/-23   
release-please.yml
Add job for publishing to PyPI and set up dependency on release-please

.github/workflows/release-please.yml
['Add a new job for publishing to PyPI', 'Add a dependency on the release-please job', 'Set up the environment for the new job', 'Conditionally run the new job based on the release-please job output', 'Add steps for checking out code, setting up Python, building, and publishing to PyPI']

+22/-2   

PR-Agent usage:
Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

@mansenfranzen
Copy link
Owner Author

@CodiumAI-Agent /describe

@codecov-commenter
Copy link

codecov-commenter commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.79%. Comparing base (38f9e16) to head (3cb0ec9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #237   +/-   ##
=======================================
  Coverage   95.79%   95.79%           
=======================================
  Files          12       12           
  Lines        1095     1095           
=======================================
  Hits         1049     1049           
  Misses         46       46           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mansenfranzen
Copy link
Owner Author

/describe

@github-actions github-actions bot added the enhancement New feature or request label Mar 26, 2024
Copy link
Contributor

PR Description updated to latest commit (3cb0ec9)

@mansenfranzen
Copy link
Owner Author

/review

Copy link
Contributor

PR Review

⏱️ Estimated effort to review [1-5]

2, because the changes are straightforward and involve moving existing steps into a different workflow, but it requires understanding of GitHub Actions workflows and the specifics of the release-please action.

🧪 Relevant tests

No

🔍 Possible issues

Possible Bug: The if: needs.release-please.outputs.release-created condition might not work as expected if the output variable release-created is not correctly set by the release-please job.

🔒 Security concerns

No

Code feedback:
relevant file.github/workflows/release-please.yml
suggestion      

Consider verifying the release-created output variable in the release-please job to ensure it's correctly set, as it's crucial for the conditional execution of the publish-to-pypi job. [important]

relevant lineif: needs.release-please.outputs.release-created

relevant file.github/workflows/release-please.yml
suggestion      

Ensure that the GITHUB_TOKEN has the necessary permissions for all actions performed in the workflow, especially for publishing to PyPI. [important]

relevant linetoken: ${{ secrets.GITHUB_TOKEN }}

relevant file.github/workflows/release-please.yml
suggestion      

Consider pinning the actions/checkout and actions/setup-python actions to a specific commit SHA to avoid potential issues from unexpected changes. [medium]

relevant line- uses: actions/checkout@v4

relevant file.github/workflows/release-please.yml
suggestion      

Verify the Python version (3.10) used is compatible with all dependencies for the project to avoid runtime issues. [medium]

relevant linepython-version: "3.10"


✨ Review tool usage guide:

Overview:
The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

  • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
[pr_reviewer]
some_config1=...
some_config2=...

See the review usage page for a comprehensive guide on using this tool.

@mansenfranzen
Copy link
Owner Author

Test that comment does not invoke PR Agent.

@mansenfranzen mansenfranzen merged commit 0864395 into main Mar 26, 2024
35 checks passed
@mansenfranzen mansenfranzen deleted the merge_publish_release_please_workflow branch March 26, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants