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_repo.md
+52-31Lines changed: 52 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,7 @@ See checklist below for details:
9
9
- Markdown changelog
10
10
- Bump version configuration (if using Python), for example [hatch](https://hatch.pypa.io/latest/)
11
11
-[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.
12
-
- Set up:
13
-
-\[_modern way_\][Add a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/) to your PyPI project
14
-
-\[_legacy way_\] 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)
12
+
-[Add a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/) to your PyPI project
15
13
- If needed, access token for [npm](https://docs.npmjs.com/creating-and-viewing-access-tokens).
16
14
17
15
## Checklist for Adoption
@@ -40,37 +38,43 @@ See checklist below for details:
- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
48
-
- if you use the example workflows, the _workflow name_ is `publish-release.yml` (or `full-release.yml`) and the
49
-
_environment_ should be left blank.
50
-
- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))
41
+
-[ ] Copy `prep-release.yml` and `publish-release.yml` (or only `full-release.yml`) from the
42
+
[example-workflows](https://github.com/jupyter-server/jupyter_releaser/tree/main/example-workflows) folder in this repository.
- 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`.
57
-
_Note_ For security reasons, it is recommended that you scope the access
58
-
to a single repository. Additionally, this token should belong to a
59
-
machine account and not a user account.
44
+
-[ ] Set up PyPI:
60
45
61
-
</details>
46
+
- Set up your PyPI project by [adding a trusted publisher](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
47
+
- if you use the example workflows, the _workflow name_ is `publish-release.yml` (or `full-release.yml`) and the
48
+
_environment_ should be `release` (the name of the GitHub environment).
49
+
- Ensure the publish release job as `permissions`: `id-token : write` (see the [documentation](https://docs.pypi.org/trusted-publishers/using-a-publisher/))
62
50
63
51
-[ ] If needed, add access token for [npm](https://docs.npmjs.com/creating-and-viewing-access-tokens), saved as `NPM_TOKEN`. Again this should
64
52
be created using a machine account that only has publish access.
53
+
65
54
-[ ] Ensure that only trusted users with 2FA have admin access to the repository, since they will be able to trigger releases.
55
+
66
56
-[ ] Switch to Markdown Changelog
57
+
67
58
- We recommend [MyST](https://myst-parser.readthedocs.io/en/latest/?badge=latest), especially if some of your docs are in reStructuredText.
68
59
- Can use `pandoc -s changelog.rst -o changelog.md` and some hand edits as needed.
69
60
- Note that [directives](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#syntax-directives) can still be used
70
-
-[ ] 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)
61
+
62
+
-[ ] Add HTML start and end comment markers to Changelog file
63
+
64
+
- see example in [CHANGELOG.md](https://github.com/jupyter-server/jupyter_releaser/blob/main/CHANGELOG.md) (view in raw mode)
65
+
66
+
```md
67
+
# Changelog
68
+
69
+
<!-- <START NEW CHANGELOG ENTRY> -->
70
+
71
+
<!-- <END NEW CHANGELOG ENTRY> -->
72
+
```
73
+
71
74
-[ ] We recommend using [hatch](https://hatch.pypa.io/latest/) for your
72
75
build system and for version handling.
73
-
- If previously providing `version_info` like `version_info = (1, 7, 0, '.dev', '0')`, use a pattern like the one below in your version file:
76
+
- If previously providing `version_info` like `version_info = (1, 7, 0, '.dev', '0')`,
77
+
use a pattern like the one below in your version file:
74
78
75
79
```python
76
80
import re
@@ -89,36 +93,53 @@ if match["rest"]:
89
93
version_info =tuple(parts)
90
94
```
91
95
92
-
- 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.
96
+
- If you need to keep node and python versions in sync, use [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version).
97
+
98
+
- See [nbformat](https://github.com/jupyter/nbformat/blob/main/pyproject.toml) for example.
93
99
94
100
-[ ] Add a GitHub Actions CI step to run the `check_release` action. For example:
95
101
102
+
- This should be run on `push` and `pull` request events. You can copy
103
+
the `check-release.yml` from this repo as an example.
- This should be run on `push` and `pull` request events. You can copy
104
-
the `check-release.yml` from this repo as an example.
105
-
106
112
- [ ] If you would like the release assets to be uploaded as artifacts, add the following step after the `check_release` action:
107
113
108
114
```yaml
109
115
- name: Upload Distributions
110
-
uses: actions/upload-artifact@v2
116
+
uses: actions/upload-artifact@v4
111
117
with:
112
118
name: dist-${{ github.run_number }}
113
119
path: .jupyter_releaser_checkout/dist
114
120
```
115
121
116
-
- [ ] 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
117
-
categorize the changelog.
122
+
- [ ] Add a workflow that uses the [`enforce-label`](https://github.com/jupyterlab/maintainer-tools#enforce-labels) action
123
+
from `jupyterlab/maintainer-tools` to ensure that all PRs have on of the triage labels used to categorize the changelog.
118
124
119
-
- [ ] 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 `prep-release.yml` and `publish-release.yml` from the `example-workflows` folder in this repository.
142
+
- [ ] 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).
122
143
123
144
- [ ] Optionally add configuration to the repository if non-standard options or hooks are needed.
0 commit comments