You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/how_to_guides/convert_repo_from_releaser.md
+30-22Lines changed: 30 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,10 @@ See checklist below for details:
17
17
A. Prep the `jupyter_releaser` fork:
18
18
19
19
-[ ] Clone this repository onto your GitHub user account.
20
-
-[ ] Add a [GitHub Access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with access to target GitHub repo to run GitHub Actions, saved as
21
-
`ADMIN_GITHUB_TOKEN` in the [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository).
20
+
-[ ] Add a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with access to target GitHub repo to run
21
+
GitHub Actions, saved as `ADMIN_GITHUB_TOKEN` in the
The token will need "public_repo", and "repo:status" permissions.
22
24
-[ ] Add access token for the [PyPI registry](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#saving-credentials-on-github) stored as `PYPI_TOKEN`.
23
25
_Note_ For security reasons, it is recommended that you scope the access
24
26
to a single repository, and use a variable called `PYPI_TOKEN_MAP` that is formatted as follows:
@@ -44,36 +46,42 @@ B. Prep target repository:
44
46
- Can use `pandoc -s changelog.rst -o changelog.md` and some hand edits as needed.
45
47
- Note that [directives](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#syntax-directives) can still be used
46
48
-[ ] Add HTML start and end comment markers to Changelog file - see example in [CHANGELOG.md](https://github.com/jupyter-server/jupyter_releaser/blob/main/CHANGELOG.md) (view in raw mode)
47
-
-[ ] Add [tbump](https://github.com/tankerhq/tbump) support if using Python - see example metadata in [pyproject.toml](https://github.com/jupyter-server/jupyter_releaser/blob/main/pyproject.toml)
48
-
- We recommend putting `setuptools` metadata in `setup.cfg` and using `version = attr: <package_name>.__version__`.
49
-
- See documentation on `setup.cfg`[metadata](https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html)
50
-
- If previously providing `version_info` like `version_info = (1, 7, 0, '.dev', '0')`, use tbump config like the one below:
49
+
-[ ] We recommend using [hatch](https://hatch.pypa.io/latest/) for your
50
+
build system and for version handling.
51
+
- If previously providing `version_info` like `version_info = (1, 7, 0, '.dev', '0')`, use a pattern like the one below in your version file:
parts: List[object] = [int(match[part]) for part in ["major", "minor", "patch"]]
65
+
if match["rest"]:
66
+
parts.append(match["rest"])
67
+
version_info = tuple(parts)
64
68
```
65
69
70
+
- If you need to keep node and python versions in sync, use [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version). See [nbformat](https://github.com/jupyter/nbformat/blob/main/pyproject.toml) for example.
71
+
66
72
-[ ] Add a GitHub Actions CI step to run the `check_release` action. For example:
- [ ] Add a workflow that uses the [`enforce-label`](https://github.com/jupyterlab/maintainer-tools#enforce-labels) action from `jupyterlab/maintainer-tools` to ensure that all PRs have on of the triage labels used to
89
97
categorize the changelog.
90
98
91
-
- [ ] Update or add `RELEASE.md` that describes the onboarding and release process, e.g.
99
+
- [ ] Update or add `RELEASE.md` that describes the onboarding and release process, e.g. [jupyter_server](https://github.com/jupyter-server/jupyter_server/blob/main/RELEASE.md).
Copy file name to clipboardExpand all lines: docs/source/how_to_guides/convert_repo_from_repo.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,18 @@ See [hecklist below for details:
14
14
15
15
## Checklist for Adoption
16
16
17
+
-[ ] Add a GitHub [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), preferably from a "machine user" GitHub
18
+
account that has write access to the repository. The token will need "public_repo", and "repo:status" permissions. Save the token as `ADMIN_GITHUB_TOKEN`
19
+
in the [repository secrets](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository). We need this
20
+
access token to allow for branch protection rules, which block the pushing
21
+
of commits when using the `GITHUB_TOKEN`, even when run from an admin user
22
+
account.
17
23
-[ ] Add access token for the [PyPI registry](https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#saving-credentials-on-github) stored as `PYPI_TOKEN`.
18
24
_Note_ For security reasons, it is recommended that you scope the access
19
25
to a single repository. Additionally, this token should belong to a
20
-
bot account and not a single user.
21
-
-[ ] If needed, add access token for [npm](https://docs.npmjs.com/creating-and-viewing-access-tokens), saved as `NPM_TOKEN`.
26
+
machine account and not a user account.
27
+
-[ ] If needed, add access token for [npm](https://docs.npmjs.com/creating-and-viewing-access-tokens), saved as `NPM_TOKEN`. Again this should
28
+
be created using a machine account that only has publish access.
22
29
-[ ] Ensure that only trusted users with 2FA have admin access to the
23
30
repository, since they will be able to trigger releases.
24
31
-[ ] Switch to Markdown Changelog
@@ -47,17 +54,19 @@ if match["rest"]:
47
54
version_info = tuple(parts)
48
55
```
49
56
57
+
- If you need to keep node and python versions in sync, use [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version). See [nbformat](https://github.com/jupyter/nbformat/blob/main/pyproject.toml) for example.
58
+
50
59
-[ ] Add a GitHub Actions CI step to run the `check_release` action. For example:
- [ ] Add a workflow that uses the [`enforce-label`](https://github.com/jupyterlab/maintainer-tools#enforce-labels) action from `jupyterlab/maintainer-tools` to ensure that all PRs have on of the triage labels used to
73
82
categorize the changelog.
74
83
75
-
- [ ] Update or add `RELEASE.md` that describes the onboarding and release process, e.g.
84
+
- [ ] Update or add `RELEASE.md` that describes the onboarding and release process, e.g. [jupyter_server](https://github.com/jupyter-server/jupyter_server/blob/main/RELEASE.md).
76
85
77
86
- [ ] Copy `prep-release.yml` and `publish-release.yml` from the `example-workflows` folder in this repository.
0 commit comments