{CI} Auto create release tag.#8392
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @wangzelin007, |
|
🚫All pull requests will be blocked to merge until Jan 6, 2025 due to CCOA |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
| if not filenames: | ||
| print("No filenames found in changes") | ||
| shas = parse_sha256_digest(added_lines) | ||
| if not shas: |
There was a problem hiding this comment.
If someone only modify the SHA, we need to update the tag, release, and re-upload the wheel package.
|
|
||
| print(f"Found {len(filenames)} files to process") | ||
| # Process each filename | ||
| for filename in filenames: |
There was a problem hiding this comment.
Since multiple extensions can be released at once, multi-version GitHub release is necessary.
| extension_name = re.match(r"^(.*?)[-_]\d+\.\d+\.\d+", filename).group(1) | ||
| history_note = get_history_note_from_source(version, extension_name) | ||
|
|
||
| # If no notes found in source code, try wheel package |
There was a problem hiding this comment.
First, retrieve the history note from the source code. If it is not available, get it from the wheel package. If it is still not available, use the default history note.
| def update_release_body(release_id: int, commit_sha: str, old_body: str, sha: str, tag_name: str) -> bool: | ||
| try: | ||
| url = f"{base_url}/releases/{release_id}" | ||
| ref_url = f"{base_url}/git/refs/tags/{tag_name}" |
There was a problem hiding this comment.
Since it is not possible to directly modify the relationship between the tag and commit in the release, I can only call the update ref API first to modify the corresponding relationship between the tag and commit.
| wheel_response = requests.get(wheel_url) | ||
| wheel_response.raise_for_status() | ||
|
|
||
| if asset_id is not None: |
There was a problem hiding this comment.
It is not possible to directly overwrite the previous wheel package; I can only delete it first and then re-upload it.
* create release tag * update * update * update * update
All releases:
https://github.com/Azure/azure-cli-extensions/releases
All tags:
https://github.com/Azure/azure-cli-extensions/tags
This PR will automatically create tags and releases based on the modifications in index.json:
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.