Skip to content

Commit d91b0b0

Browse files
committed
Fix releaser
1 parent d233cff commit d91b0b0

File tree

2 files changed

+35
-20
lines changed

2 files changed

+35
-20
lines changed

.github/workflows/check-release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,27 @@ on:
55
pull_request:
66
branches: ["*"]
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
check_release:
1013
runs-on: ubuntu-latest
1114
steps:
1215
- name: Checkout
1316
uses: actions/checkout@v3
17+
1418
- name: Base Setup
1519
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
16-
- name: Install Dependencies
17-
run: |
18-
pip install -e .
20+
1921
- name: Check Release
2022
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
2123
with:
2224
token: ${{ secrets.GITHUB_TOKEN }}
25+
2326
- name: Upload Distributions
2427
uses: actions/upload-artifact@v3
2528
with:
26-
name: jupyterlab_blockly-releaser-dist-${{ '{{ github.run_number }}' }}
27-
path: .jupyter_releaser_checkout/dist
29+
name: jupyter-releaser-dist-${{ github.run_number }}
30+
path: |
31+
.jupyter_releaser_checkout/dist

pyproject.toml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
build-backend = "hatchling.build"
3-
requires = ["hatchling>=1.4.0", "hatch-nodejs-version", "jupyterlab~=3.4"]
3+
requires = ["hatchling>=1.4.0", "hatch-nodejs-version", "jupyterlab~=3.6"]
44

55
[project]
66
name = "jupyterlab_blockly"
@@ -23,14 +23,15 @@ classifiers = [
2323
"Programming Language :: Python :: 3.11",
2424
]
2525
dependencies = [
26-
"jupyterlab~=3.4"
26+
"jupyterlab~=3.6"
2727
]
2828
dynamic = ["version", "description", "authors", "urls", "keywords"]
2929

3030
[project.optional-dependencies]
3131
dev = [
3232
"click",
33-
"jupyter_releaser==0.22"
33+
"pre-commit",
34+
"jupyter_releaser"
3435
]
3536

3637
[tool.hatch.version]
@@ -39,9 +40,12 @@ source = "nodejs"
3940
[tool.hatch.metadata.hooks.nodejs]
4041
fields = ["description", "authors", "urls"]
4142

42-
[tool.hatch.build]
43-
artifacts = ["package.json", "scripts", "packages", "patches", "jupyterlab_blockly/labextension"]
44-
exclude = [".github", "binder"]
43+
[tool.hatch.build.targets.sdist]
44+
artifacts = ["/jupyterlab_blockly/labextension"]
45+
exclude = ["/.github", "/binder", "node_modules"]
46+
47+
[tool.hatch.build.targets.sdist.force-include]
48+
"./packages" = "packages"
4549

4650
[tool.hatch.build.targets.wheel.shared-data]
4751
"jupyterlab_blockly/labextension" = "share/jupyter/labextensions/jupyterlab-blockly-extension"
@@ -57,21 +61,28 @@ ensured-targets = [
5761
skip-if-exists = ["jupyterlab_blockly/labextension/static/style.js"]
5862

5963
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
60-
build_cmd = "build:prod"
61-
npm = ["jlpm"]
62-
63-
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
64-
build_cmd = "install:extension"
6564
npm = ["jlpm"]
66-
build_dir = "jupyterlab_blockly/labextension"
65+
build_cmd = "build:prod"
66+
editable_build_cmd = "install:extension"
6767

6868
[tool.jupyter-releaser.options]
6969
version-cmd = "python scripts/bump-version.py --force"
7070

7171
[tool.jupyter-releaser.hooks]
72-
before-bump-version = ["python -m pip install jupyterlab~=3.4", "jlpm"]
73-
before-build-npm = ["python -m pip install jupyterlab~=3.4", "jlpm", "jlpm build:prod"]
74-
before-build-python = ["jlpm clean:all"]
72+
before-bump-version = [
73+
"python -m pip install --pre -U jupyterlab~=3.6",
74+
"jlpm"
75+
]
76+
before-build-npm = [
77+
"jlpm build:prod"
78+
]
79+
before-build-python = [
80+
"jlpm clean:all",
81+
# Build the assets
82+
"jlpm build:prod",
83+
# Clean the build artifacts to not include them in sdist
84+
"jlpm clean:lib"
85+
]
7586

7687
[tool.check-wheel-contents]
7788
ignore = ["W002"]

0 commit comments

Comments
 (0)