WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 5ee736b

Browse files
authored
Merge pull request #2 from github/update-readme-contributors
Fix release workflow to work with repository rules
2 parents dc6556d + 704e272 commit 5ee736b

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111

1212
permissions:
1313
contents: write
14+
pull-requests: write
1415

1516
steps:
1617
- name: Checkout repository
@@ -204,7 +205,7 @@ jobs:
204205
env:
205206
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
206207

207-
- name: Update version in pyproject.toml
208+
- name: Update version in pyproject.toml (for release artifacts only)
208209
if: steps.check_release.outputs.exists == 'false'
209210
run: |
210211
# Update version in pyproject.toml (remove 'v' prefix for Python versioning)
@@ -213,19 +214,8 @@ jobs:
213214
214215
if [ -f "pyproject.toml" ]; then
215216
sed -i "s/version = \".*\"/version = \"$PYTHON_VERSION\"/" pyproject.toml
216-
echo "Updated pyproject.toml version to $PYTHON_VERSION"
217+
echo "Updated pyproject.toml version to $PYTHON_VERSION (for release artifacts only)"
217218
fi
218219
219-
- name: Commit version update
220-
if: steps.check_release.outputs.exists == 'false'
221-
run: |
222-
git config --local user.email "[email protected]"
223-
git config --local user.name "GitHub Action"
224-
225-
if git diff --quiet; then
226-
echo "No changes to commit"
227-
else
228-
git add pyproject.toml
229-
git commit -m "chore: bump version to ${{ steps.get_tag.outputs.new_version }}"
230-
git push
231-
fi
220+
# Note: No longer committing version changes back to main branch
221+
# The version is only updated in the release artifacts

0 commit comments

Comments
 (0)