File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,11 +31,31 @@ jobs:
3131 uv version --bump ${{ inputs.bump }}
3232 echo "version=$(uv version --short)" >> $GITHUB_OUTPUT
3333
34- - name : Commit version bump
35- uses : stefanzweifel/git-auto-commit-action@v5
36- with :
37- commit_message : " Bump version to ${{ steps.bump.outputs.version }} [skip ci]"
38- file_pattern : pyproject.toml
34+ - name : Commit version bump (signed via API)
35+ run : |
36+ VERSION="${{ steps.bump.outputs.version }}"
37+ FILE_CONTENT=$(base64 -w 0 pyproject.toml)
38+ BLOB_SHA=$(gh api repos/${{ github.repository }}/git/blobs \
39+ -f content="$FILE_CONTENT" \
40+ -f encoding=base64 \
41+ --jq '.sha')
42+ TREE_SHA=$(gh api repos/${{ github.repository }}/git/trees \
43+ -f base_tree="${{ github.sha }}" \
44+ -f "tree[][path]=pyproject.toml" \
45+ -f "tree[][mode]=100644" \
46+ -f "tree[][type]=blob" \
47+ -f "tree[][sha]=$BLOB_SHA" \
48+ --jq '.sha')
49+ COMMIT_SHA=$(gh api repos/${{ github.repository }}/git/commits \
50+ -f message="Bump version to $VERSION [skip ci]" \
51+ -f tree="$TREE_SHA" \
52+ -f "parents[]=${{ github.sha }}" \
53+ --jq '.sha')
54+ gh api repos/${{ github.repository }}/git/refs/heads/${{ github.ref_name }} \
55+ -X PATCH \
56+ -f sha="$COMMIT_SHA"
57+ env :
58+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3959
4060 - name : Install dependencies
4161 run : |
You can’t perform that action at this time.
0 commit comments