Skip to content

Commit adcbbee

Browse files
authored
Merge pull request #157 from papr/automate_maintenance
Github Action: Use personal access token to push bumped version to repo
2 parents ebbe678 + 56cf574 commit adcbbee

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
with:
106106
tags: true
107107
branch: ${{ github.ref }}
108-
github_token: ${{ secrets.GITHUB_TOKEN }}
108+
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
109109
- name: Save new git commit SHA to job output
110110
id: save_bumped_version_sha
111111
run: |

MAINTENANCE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ To avoid human error, it is recommended to use the
4141
the `deploy` extra requirements. To manually bump the version, run `bump2version <part>`,
4242
where `<part>` is either `major`, `minor`, or `patch`.
4343

44-
**Note:** It is **not** recommended to run this tool manually. Instead, this step hasbeen automated
45-
as part of the ["Deploy to PyPI" Github Action](.github/workflows/deploy.yml). See below for details.
44+
**Note:** It is **not** recommended to run this tool manually. Instead, this step has
45+
been automated as part of the ["Deploy to PyPI" Github Action](.github/workflows/deploy.yml).
46+
To push the version-bumped commit back to the repo, the action requires more permissions
47+
than the [default `GITHUB_TOKEN` provides](https://github.com/zeromq/pyre/pull/155#issuecomment-861020168).
48+
Instead, it [requires a personal access token](https://docs.github.com/en/actions/reference/authentication-in-a-workflow#granting-additional-permissions)
49+
(PAT; stored and accessed as the `PERSONAL_ACCESS_TOKEN` secret). See below for further details.
4650

4751
### Building a distribution
4852

0 commit comments

Comments
 (0)