Skip to content

Commit

Permalink
Fix releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcarlos committed Mar 15, 2023
1 parent d233cff commit d91b0b0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 20 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@ on:
pull_request:
branches: ["*"]

permissions:
contents: write

jobs:
check_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install Dependencies
run: |
pip install -e .

- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v3
with:
name: jupyterlab_blockly-releaser-dist-${{ '{{ github.run_number }}' }}
path: .jupyter_releaser_checkout/dist
name: jupyter-releaser-dist-${{ github.run_number }}
path: |
.jupyter_releaser_checkout/dist
41 changes: 26 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling>=1.4.0", "hatch-nodejs-version", "jupyterlab~=3.4"]
requires = ["hatchling>=1.4.0", "hatch-nodejs-version", "jupyterlab~=3.6"]

[project]
name = "jupyterlab_blockly"
Expand All @@ -23,14 +23,15 @@ classifiers = [
"Programming Language :: Python :: 3.11",
]
dependencies = [
"jupyterlab~=3.4"
"jupyterlab~=3.6"
]
dynamic = ["version", "description", "authors", "urls", "keywords"]

[project.optional-dependencies]
dev = [
"click",
"jupyter_releaser==0.22"
"pre-commit",
"jupyter_releaser"
]

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

[tool.hatch.build]
artifacts = ["package.json", "scripts", "packages", "patches", "jupyterlab_blockly/labextension"]
exclude = [".github", "binder"]
[tool.hatch.build.targets.sdist]
artifacts = ["/jupyterlab_blockly/labextension"]
exclude = ["/.github", "/binder", "node_modules"]

[tool.hatch.build.targets.sdist.force-include]
"./packages" = "packages"

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

[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
build_cmd = "build:prod"
npm = ["jlpm"]

[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
build_cmd = "install:extension"
npm = ["jlpm"]
build_dir = "jupyterlab_blockly/labextension"
build_cmd = "build:prod"
editable_build_cmd = "install:extension"

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

[tool.jupyter-releaser.hooks]
before-bump-version = ["python -m pip install jupyterlab~=3.4", "jlpm"]
before-build-npm = ["python -m pip install jupyterlab~=3.4", "jlpm", "jlpm build:prod"]
before-build-python = ["jlpm clean:all"]
before-bump-version = [
"python -m pip install --pre -U jupyterlab~=3.6",
"jlpm"
]
before-build-npm = [
"jlpm build:prod"
]
before-build-python = [
"jlpm clean:all",
# Build the assets
"jlpm build:prod",
# Clean the build artifacts to not include them in sdist
"jlpm clean:lib"
]

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

0 comments on commit d91b0b0

Please sign in to comment.