- Notifications
You must be signed in to change notification settings - Fork5.7k
Fine Tunechango
and Release Workflows#4758
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
25 commits Select commitHold shift + click to select a range
575828c
try fixing github release & channel post
Bibo-Joshif8dde47
override ChanGo.release to replace NEXT.VERSION
Bibo-Joshi3345e7c
Add chango fragment for PR #4758
Bibo-Joshi90cbf44
Simplify release workflow description
Bibo-Joshi6a68b6a
Have a go at auto-running `chango release` - first test commit that i…
Bibo-Joshi4e398f1
Add chango fragment for PR #4758
Bibo-Joshi86c3da8
Merge branch 'master' into release-fine-tune
Bibo-Joshid083577
Minor tweaks - mostly next test commit that's expected to do a release
Bibo-Joshiaecf8f0
add some debug logging
Bibo-Joshiacec93b
different debug logging
Bibo-Joshi7970b6c
try different case-insensitivity handling
Bibo-Joshie8f0b98
Try using a different var name
Bibo-Joshi166bc91
try again
Bibo-Joshi8cd8640
skip the v
Bibo-Joshi509821b
Add some debug prints
Bibo-Joshi5556889
try something else
Bibo-Joshi1077665
Do chango Release
Bibo-Joshiace5449
Revert "Do chango Release"
Bibo-Joshi604b713
another fix-try
Bibo-Joshi195ed2b
aaaand again
Bibo-Joshi44c115a
Do chango Release
Bibo-Joshi85c6207
Revert "Do chango Release"
Bibo-Joshi5c64ae3
Remove debug logging
Bibo-Joshi83b0e7e
Add chango fragment for PR #4758
Bibo-Joshi540090f
typo
Bibo-JoshiFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
66 changes: 66 additions & 0 deletions.github/workflows/chango.yml
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: Chango | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
permissions: {} | ||
jobs: | ||
create-chango-fragment: | ||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
name: Create chango Fragment | ||
runs-on: ubuntu-latest | ||
outputs: | ||
IS_RELEASE_PR: ${{ steps.check_title.outputs.IS_RELEASE_PR }} | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
# needed for commit and push step at the end | ||
persist-credentials: true | ||
- name: Check PR Title | ||
id: check_title | ||
run: | # zizmor: ignore[template-injection] | ||
if [[ "$(echo "${{ github.event.pull_request.title }}" | tr '[:upper:]' '[:lower:]')" =~ ^bump\ version\ to\ .* ]]; then | ||
echo "COMMIT_AND_PUSH=false" >> $GITHUB_OUTPUT | ||
echo "IS_RELEASE_PR=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "COMMIT_AND_PUSH=true" >> $GITHUB_OUTPUT | ||
echo "IS_RELEASE_PR=false" >> $GITHUB_OUTPUT | ||
fi | ||
# Create the new fragment | ||
- uses: Bibo-Joshi/chango@9d6bd9d7612eca5fab2c5161687011be59baaf19 # v0.4.0 | ||
with: | ||
github-token: ${{ secrets.CHANGO_PAT }} | ||
query-issue-types: true | ||
commit-and-push: ${{ steps.check_title.outputs.COMMIT_AND_PUSH }} | ||
# Run `chango release` if applicable - needs some additional setup. | ||
- name: Set up Python | ||
if: steps.check_title.outputs.IS_RELEASE_PR == 'true' | ||
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0 | ||
with: | ||
python-version: "3.x" | ||
- name: Do Release | ||
if: steps.check_title.outputs.IS_RELEASE_PR == 'true' | ||
run: | | ||
cd ./target-repo | ||
git add changes/unreleased/* | ||
pip install . -r docs/requirements-docs.txt | ||
VERSION_TAG=$(python -c "from telegram import __version__; print(f'{__version__}')") | ||
chango release --uid $VERSION_TAG | ||
- name: Commit & Push | ||
if: steps.check_title.outputs.IS_RELEASE_PR == 'true' | ||
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0 | ||
with: | ||
commit_message: "Do chango Release" | ||
repository: ./target-repo |
30 changes: 0 additions & 30 deletions.github/workflows/chango_fragment.yml
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
6 changes: 6 additions & 0 deletions.github/workflows/release_pypi.yml
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
3 changes: 3 additions & 0 deletions.github/workflows/release_test_pypi.yml
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
29 changes: 28 additions & 1 deletionchanges/config.py
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
5 changes: 5 additions & 0 deletionschanges/unreleased/4758.dSyCdBJWEJroH2GynR2VaJ.toml
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,5 @@ | ||
internal = "Fine Tune ``chango`` and Release Workflows" | ||
[[pull_requests]] | ||
uid = "4758" | ||
author_uid = "Bibo-Joshi" | ||
closes_threads = ["4720"] |
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.