79
79
- name : Run all tests, linting and baselines
80
80
if : ${{ !inputs.skip_code_quality }}
81
81
run : make pr
82
- - name : Git client setup and refresh tip
83
- run : |
84
- git config user.name "Release bot"
85
- git config user.email "[email protected] "
86
- git config pull.rebase true
87
- git config remote.origin.url >&- || git remote add origin https://github.com/"${ORIGIN}" # Git Detached mode (release notes) doesn't have origin
88
- git pull origin "${BRANCH}"
89
82
- name : Bump package version
90
83
id : versioning
91
84
run : poetry version "${RELEASE_VERSION}"
@@ -105,16 +98,6 @@ jobs:
105
98
# and also future-proof for when we switch to protected branch and update via PR
106
99
key : ${{ runner.os }}-${{ env.RELEASE_VERSION }}-${{ hashFiles('**/poetry.lock') }}
107
100
108
- - name : Update version in trunk
109
- if : steps.versioning.outcome == 'success'
110
- run : |
111
- HAS_CHANGE=$(git status --porcelain)
112
- test -z "${HAS_CHANGE}" && echo "Nothing to update" && exit 0
113
- git add pyproject.toml
114
- git commit -m "bump version to ${RELEASE_VERSION}" --no-verify
115
- git pull origin "${BRANCH}" # prevents concurrent branch update failing push
116
- git push origin HEAD:refs/heads/"${BRANCH}"
117
-
118
101
release :
119
102
needs : build
120
103
environment : release
@@ -163,6 +146,28 @@ jobs:
163
146
latest_published_version : ${{ needs.build.outputs.RELEASE_VERSION }}
164
147
pre_release : ${{ inputs.pre_release }}
165
148
149
+ bump_version :
150
+ needs : [build, release]
151
+ permissions :
152
+ contents : write
153
+ pull-requests : write
154
+ runs-on : ubuntu-latest
155
+ env :
156
+ RELEASE_VERSION : ${{ needs.build.outputs.RELEASE_VERSION }}
157
+ steps :
158
+ - uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
159
+ - name : Bump package version
160
+ id : versioning
161
+ run : poetry version "${RELEASE_VERSION}"
162
+ - name : Create PR
163
+ id : create-pr
164
+ uses : ./.github/actions/create-pr
165
+ with :
166
+ files : " pyproject.toml"
167
+ temp_branch_prefix : " ci-bump"
168
+ pull_request_title : " chore(ci): bump version to ${{ env.RELEASE_VERSION }}"
169
+ github_token : ${{ secrets.GITHUB_TOKEN }}
170
+
166
171
post_release :
167
172
needs : [build, release, publish_layer]
168
173
permissions :
0 commit comments