File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1616 permissions :
1717 # write permission is required to update version.py
1818 contents : write
19+ pull-requests : write
1920 runs-on : ubuntu-latest
2021 steps :
2122 - name : Checkout repository
@@ -29,11 +30,23 @@ jobs:
2930 sed -i "s/^__version__ = .*/__version__ = \"$VERSION\"/" datajoint/version.py
3031 cat datajoint/version.py
3132 # Commit the changes
33+ BRANCH_NAME="update-version-$VERSION"
34+ git checkout -b $BRANCH_NAME
3235 git config --global user.name "github-actions"
3336 git config --global user.email "github-actions@github.com"
3437 git add datajoint/version.py
3538 git commit -m "Update version.py to $VERSION"
36- git push
39+ git push origin $BRANCH_NAME
40+ echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
41+ echo "VERSION=$VERSION" >> $GITHUB_ENV
42+ - name : Create Pull Request
43+ uses : peter-evans/create-pull-request@v6
44+ with :
45+ token : ${{ secrets.GITHUB_TOKEN }}
46+ branch : ${{ env.BRANCH_NAME }}
47+ title : " Update version.py to ${{ github.event.release.name }}"
48+ body : " This PR updates `version.py` to match the latest release: ${{ github.event.release.name }}"
49+ base : master
3750 slack-notification :
3851 runs-on : ubuntu-latest
3952 steps :
You can’t perform that action at this time.
0 commit comments