Building AI agents, atomically
Update python-publish.yml
Kenny Vaneetvelde1ec874cf5a97
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.ymlindex 8dbcc13..f44a31c 100644--- a/.github/workflows/python-publish.yml+++ b/.github/workflows/python-publish.yml@@ -5,8 +5,7 @@ on:types: [published]permissions:- contents: write- pull-requests: write+ contents: readjobs:deploy:@@ -26,36 +25,15 @@ jobs:pip install build- name: Bump version in pyproject.toml- id: bump_versionrun: |VERSION=$(echo $GITHUB_REF | sed 's/refs\/tags\/v//')- BRANCH_NAME="bump-version-$VERSION"- echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV- echo "VERSION=$VERSION" >> $GITHUB_ENV- git checkout -b $BRANCH_NAMEsed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.toml- git config --global user.name "github-actions[bot]"- git config --global user.email "github-actions[bot]@users.noreply.github.com"- git add pyproject.toml- git commit -m "Bump version to $VERSION"- git push origin $BRANCH_NAMEshell: bash- - name: Create Pull Request- uses: peter-evans/create-pull-request@v5- with:- token: ${{ secrets.GITHUB_TOKEN }}- branch: ${{ env.BRANCH_NAME }}- title: "Bump version to ${{ env.VERSION }}"- body: "This PR bumps the version to ${{ env.VERSION }}."- base: main-- name: Build package- if: github.event_name == 'release'run: python -m build- name: Publish package- if: github.event_name == 'release'uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29with:user: __token__