-
Notifications
You must be signed in to change notification settings - Fork 31
add automated release workflows (PyPI disabled for testing) #36
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
56747fd
add automated release workflows (PyPI disabled for testing)
sundargthb e4ab526
add automated release workflows (PyPI disabled for testing)
sundargthb e321162
add automated release workflows (PyPI disabled for testing)
sundargthb e9f6456
fix: trigger workflow recognition
sundargthb 47da6cb
fix: version extraction to handle multiple matches
sundargthb fcaf606
fix: use correct SDK bump_version.py without requests dependency
sundargthb 539cd35
feat: enable Test PyPI publishing
sundargthb 6e2e95c
fix: version grep in bump step
sundargthb 48c8649
enable test pypi publishing
sundargthb 99c5f7c
add uv venv
sundargthb 16509d8
add uv venv
sundargthb cdd4a27
Update workflow and script files
sundargthb e3e34f0
Update workflow and script files
sundargthb 15f2945
Update workflow and script files
sundargthb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: PR Auto-merge | ||
|
||
on: | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
auto-merge: | ||
name: Auto-merge Release PRs | ||
runs-on: ubuntu-latest | ||
# Only run when PR is approved and it's a release PR | ||
if: | | ||
github.event.review.state == 'approved' && | ||
github.event.pull_request.user.login == 'github-actions[bot]' && | ||
startsWith(github.event.pull_request.head.ref, 'release/') && | ||
github.event.pull_request.base.ref == 'main' | ||
|
||
steps: | ||
- name: Check CI status | ||
id: ci-status | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const { data: checkRuns } = await github.rest.checks.listForRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: context.payload.pull_request.head.sha | ||
}); | ||
|
||
// Include ALL required checks | ||
const requiredChecks = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. consider adding integration tests too |
||
'Lint', | ||
'Test Python 3.10', | ||
'Test Python 3.11', | ||
'Test Python 3.12', | ||
'Test Python 3.13', | ||
'Build Package' | ||
]; | ||
|
||
const allPassed = requiredChecks.every(checkName => { | ||
const check = checkRuns.check_runs.find(run => run.name === checkName); | ||
return check && check.conclusion === 'success'; | ||
}); | ||
|
||
console.log(`All required checks passed: ${allPassed}`); | ||
return allPassed; | ||
|
||
- name: Auto-merge PR | ||
if: steps.ci-status.outputs.result == 'true' | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
await github.rest.pulls.merge({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: context.payload.pull_request.number, | ||
merge_method: 'squash', | ||
commit_title: `Release v${context.payload.pull_request.head.ref.split('/')[1]}`, | ||
commit_message: 'Auto-merged by release workflow' | ||
}); | ||
|
||
console.log('✓ PR auto-merged successfully'); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.