File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -47,18 +47,14 @@ jobs:
47
47
user : __token__
48
48
password : ${{ secrets.PYPI_API_TOKEN }}
49
49
50
- - name : Commit and push changes
50
+ - name : Commit files
51
51
run : |
52
- # Get the default branch name (usually main or master)
53
- DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)
54
-
55
- # Checkout the default branch
56
- git checkout $DEFAULT_BRANCH
57
-
58
- # Update the file again (as checking out might have reverted it)
59
- sed -i "s/version = \".*\"/version = \"$VERSION\"/" pyproject.toml
60
-
61
- # Stage, commit and push
62
- git add pyproject.toml
63
- git commit -m "chore: update version to $VERSION [skip ci]"
64
- git push origin $DEFAULT_BRANCH
52
+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
53
+ git config --local user.name "github-actions[bot]"
54
+ git commit -a -m "Update toml version"
55
+
56
+ - name : Push changes
57
+ uses : ad-m/github-push-action@master
58
+ with :
59
+ github_token : ${{ secrets.GITHUB_TOKEN }}
60
+ branch : ${{ github.ref }}
You can’t perform that action at this time.
0 commit comments