Skip to content

Commit 51ca23c

Browse files
authored
Update release doc (#168)
* Updated release instructions * Ensures labels are added to PRs * Updated check-release wflow to run only after merge to main * Bumped python and node versions to current.
1 parent f8c077c commit 51ca23c

File tree

3 files changed

+59
-19
lines changed

3 files changed

+59
-19
lines changed

.github/workflows/check-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,27 @@ on:
66
pull_request:
77
branches:
88
- main
9+
types: [closed]
910

1011
permissions:
1112
contents: write
1213

1314
jobs:
1415
check_release:
16+
if: ${{ github.event.pull_request.merged }}
1517
runs-on: ubuntu-latest
1618
steps:
1719
- name: Checkout
1820
uses: actions/checkout@v2
1921
- name: Install Python
2022
uses: actions/setup-python@v2
2123
with:
22-
python-version: 3.9
24+
python-version: 3.10
2325
architecture: 'x64'
2426
- name: Install node
2527
uses: actions/setup-node@v2
2628
with:
27-
node-version: '14.x'
29+
node-version: '16.x'
2830

2931

3032
- name: Get pip cache dir
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Enforce PR label
2+
3+
on:
4+
pull_request:
5+
types: [labeled, unlabeled, opened, edited, synchronize]
6+
jobs:
7+
enforce-label:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: write
11+
steps:
12+
- name: enforce-triage-label
13+
uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1

RELEASE.md

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).
44

5+
## Automated releases with the Jupyter Releaser
6+
7+
The extension repository should already be compatible with the Jupyter Releaser.
8+
9+
Check out the [workflow documentation](https://github.com/jupyter-server/jupyter_releaser#typical-workflow) for more information.
10+
11+
Here is a summary of the steps to cut a new release:
12+
13+
- Fork the [`jupyter-releaser` repo](https://github.com/jupyter-server/jupyter_releaser)
14+
- Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the Github Secrets in the fork
15+
- Go to the Actions panel
16+
- Run the "Step 1: Prep Release" workflow, this will create a draft release in github for review
17+
- Run the "Step 2: Publish Release" workflow
18+
519
## Manual release
620

721
### Python package
@@ -15,10 +29,37 @@ Python package. Before generating a package, we first need to install `build`.
1529
pip install build twine tbump
1630
```
1731

32+
Make sure you have checked out the `main` branch updated from remote.
33+
34+
```bash
35+
git checkout main
36+
git remote update
37+
git pull upstream main
38+
```
39+
1840
Bump the version using `tbump`. By default this will create a tag.
1941

2042
```bash
21-
tbump <new-version>
43+
tbump --no-push <new-version>
44+
```
45+
46+
Push the bump version commit and tag to main upstream branch.
47+
48+
```bash
49+
git push upstream main
50+
git push upstream <new-version-tag>
51+
```
52+
53+
Checkout the new tagged commit.
54+
55+
```bash
56+
git checkout <new-version-tag>
57+
```
58+
59+
Build the extension
60+
61+
```bash
62+
jlpm run build:prod
2263
```
2364

2465
To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
@@ -44,22 +85,6 @@ npm login
4485
npm publish --access public
4586
```
4687

47-
## Automated releases with the Jupyter Releaser
48-
49-
The extension repository should already be compatible with the Jupyter Releaser.
50-
51-
Check out the [workflow documentation](https://github.com/jupyter-server/jupyter_releaser#typical-workflow) for more information.
52-
53-
Here is a summary of the steps to cut a new release:
54-
55-
- Fork the [`jupyter-releaser` repo](https://github.com/jupyter-server/jupyter_releaser)
56-
- Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the Github Secrets in the fork
57-
- Go to the Actions panel
58-
- Run the "Draft Changelog" workflow
59-
- Merge the Changelog PR
60-
- Run the "Draft Release" workflow
61-
- Run the "Publish Release" workflow
62-
6388
## Publishing to `conda-forge`
6489

6590
If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html

0 commit comments

Comments
 (0)