Building AI agents, atomically
Update python-publish.yml
Kenny Vaneetvelde45c54cb1b1b1
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.ymlindex ebc827d..e48ce22 100644--- a/.github/workflows/python-publish.yml+++ b/.github/workflows/python-publish.yml@@ -6,6 +6,7 @@ on:permissions:contents: write+ pull-requests: writejobs:deploy:@@ -30,18 +31,39 @@ jobs:sed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.tomlshell: bash- - name: Commit and push changes+ - name: Commit changesrun: |git config --global user.name "github-actions[bot]"git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"+ git checkout -b bump-version-$VERSIONgit add pyproject.tomlgit commit -m "Bump version to $VERSION"- git push origin HEAD:main+ git push origin bump-version-$VERSION++ - name: Create Pull Request+ uses: peter-evans/create-pull-request@v5+ with:+ token: ${{ secrets.GITHUB_TOKEN }}+ commit-message: "Bump version to $VERSION"+ branch: bump-version-$VERSION+ title: "Bump version to $VERSION"+ body: "This PR bumps the version to $VERSION."+ labels: automerge++ - name: Enable Auto-Merge+ uses: pascalgn/[email protected]+ with:+ token: ${{ secrets.GITHUB_TOKEN }}+ merge-method: squash+ required-labels: automerge+ delete-branch: true- name: Build package+ if: github.event.pull_request.merged == truerun: python -m build- name: Publish package+ if: github.event.pull_request.merged == trueuses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29with:user: __token__