Skip to content

Commit 8772031

Browse files
committed
chore: add release files
1 parent f8941ee commit 8772031

File tree

4 files changed

+111
-0
lines changed

4 files changed

+111
-0
lines changed

.github/workflows/check-release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Release
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
branches: ["*"]
7+
8+
jobs:
9+
check_release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Base Setup
15+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
16+
- name: Install Dependencies
17+
run: |
18+
pip install -e .
19+
- name: Check Release
20+
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
21+
with:
22+
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Upload Distributions
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: jupyterlab_myst-releaser-dist-${{ github.run_number }}
29+
path: .jupyter_releaser_checkout/dist

.github/workflows/enforce-label.yml

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

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changelog
2+
3+
<!-- <START NEW CHANGELOG ENTRY> -->
4+
<!-- <END NEW CHANGELOG ENTRY> -->

RELEASE.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Making a new release of jupyterlab_myst
2+
3+
The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).
4+
5+
## Manual release
6+
7+
### Python package
8+
9+
This extension can be distributed as Python packages. All of the Python
10+
packaging instructions are in the `pyproject.toml` file to wrap your extension in a
11+
Python package. Before generating a package, you first need to install some tools:
12+
13+
```bash
14+
pip install build twine hatch
15+
```
16+
17+
Bump the version using `hatch`. By default this will create a tag.
18+
See the docs on [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version#semver) for details.
19+
20+
```bash
21+
hatch version <new-version>
22+
```
23+
24+
To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
25+
26+
```bash
27+
python -m build
28+
```
29+
30+
> `python setup.py sdist bdist_wheel` is deprecated and will not work for this package.
31+
32+
Then to upload the package to PyPI, do:
33+
34+
```bash
35+
twine upload dist/*
36+
```
37+
38+
### NPM package
39+
40+
To publish the frontend part of the extension as a NPM package, do:
41+
42+
```bash
43+
npm login
44+
npm publish --access public
45+
```
46+
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://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html) for more information.
52+
53+
Here is a summary of the steps to cut a new release:
54+
55+
- Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the [Github Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) in the repository
56+
- Go to the Actions panel
57+
- Run the "Step 1: Prep Release" workflow
58+
- Check the draft changelog
59+
- Run the "Step 2: Publish Release" workflow
60+
61+
## Publishing to `conda-forge`
62+
63+
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
64+
65+
Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.

0 commit comments

Comments
 (0)