File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,24 @@ jobs:
3333 - name : Build the package
3434 run : poetry build
3535
36- # 🔹 Commit metadata back to repo
36+ # Commit metadata back to repo
3737 - name : Commit and push metadata
3838 run : |
3939 git config --global user.name "github-actions[bot]"
4040 git config --global user.email "github-actions[bot]@users.noreply.github.com"
41+
42+ # Switch to main branch
43+ git fetch origin main
44+ git checkout main
45+
46+ # Add metadata and commit only if changes exist
4147 git add metadata/
42- git commit -m ":bookmark: Update metadata after release"
43- git push origin HEAD:main
48+ if ! git diff --cached --quiet; then
49+ git commit -m ":bookmark: Update metadata after release"
50+ git push origin main
51+ else
52+ echo "No changes to commit"
53+ fi
4454
4555 - name : Configure Poetry for PyPI
4656 run : |
You can’t perform that action at this time.
0 commit comments