Skip to content

Commit b99a21a

Browse files
authored
Add releaser CI scripts (#217)
* Add CI scripts * Update release script * debug * Bump ydoc * Use trusted publisher * Pin JupyterLab in UI test
1 parent 0056777 commit b99a21a

File tree

5 files changed

+98
-17
lines changed

5 files changed

+98
-17
lines changed

.github/workflows/prep-release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 'Step 1: Prep Release'
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version_spec:
6+
description: 'New Version Specifier'
7+
default: 'next'
8+
required: false
9+
branch:
10+
description: 'The branch to target'
11+
required: false
12+
post_version_spec:
13+
description: 'Post Version Specifier'
14+
required: false
15+
since:
16+
description: 'Use PRs with activity since this date or git reference'
17+
required: false
18+
since_last_stable:
19+
description: 'Use PRs with activity since the last stable git tag'
20+
required: false
21+
type: boolean
22+
jobs:
23+
prep_release:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
27+
28+
- name: Prep Release
29+
id: prep-release
30+
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
31+
with:
32+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
33+
version_spec: ${{ github.event.inputs.version_spec }}
34+
post_version_spec: ${{ github.event.inputs.post_version_spec }}
35+
target: ${{ github.event.inputs.target }}
36+
branch: ${{ github.event.inputs.branch }}
37+
since: ${{ github.event.inputs.since }}
38+
since_last_stable: ${{ github.event.inputs.since_last_stable }}
39+
40+
- name: '** Next Step **'
41+
run: |
42+
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Step 2: Publish Release"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
branch:
6+
description: "The target branch"
7+
required: false
8+
release_url:
9+
description: "The URL of the draft GitHub release"
10+
required: false
11+
steps_to_skip:
12+
description: "Comma separated list of steps to skip"
13+
required: false
14+
15+
jobs:
16+
publish_release:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
# This is useful if you want to use PyPI trusted publisher
20+
# and NPM provenance
21+
id-token: write
22+
steps:
23+
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
24+
25+
- name: Populate Release
26+
id: populate-release
27+
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
28+
with:
29+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
30+
branch: ${{ github.event.inputs.branch }}
31+
release_url: ${{ github.event.inputs.release_url }}
32+
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}
33+
34+
- name: Finalize Release
35+
id: finalize-release
36+
env:
37+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38+
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
39+
with:
40+
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
41+
release_url: ${{ steps.populate-release.outputs.release_url }}
42+
43+
- name: "** Next Step **"
44+
if: ${{ success() }}
45+
run: |
46+
echo "Verify the final release"
47+
echo ${{ steps.finalize-release.outputs.release_url }}
48+
49+
- name: "** Failure Message **"
50+
if: ${{ failure() }}
51+
run: |
52+
echo "Failed to Publish the Draft Release Url:"
53+
echo ${{ steps.populate-release.outputs.release_url }}

.github/workflows/ui-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip
31-
python -m pip install jupyter_packaging jupyterlab
31+
python -m pip install jupyter_packaging "jupyterlab==4.0.12"
3232
3333
- name: Install the extension
3434
run: |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"dependencies": {
5656
"@jupyter-widgets/base": "^6.0.6",
5757
"@jupyter-widgets/jupyterlab-manager": "^5.0.9",
58-
"@jupyter/ydoc": "~1.0.2",
58+
"@jupyter/ydoc": "^1.0.2",
5959
"@jupyterlab/application": "^4.0.0",
6060
"@jupyterlab/apputils": "^4.0.0",
6161
"@jupyterlab/cells": "^4.0.0",

yarn.lock

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,20 +2121,6 @@ __metadata:
21212121
languageName: node
21222122
linkType: hard
21232123

2124-
"@jupyter/ydoc@npm:~1.0.2":
2125-
version: 1.0.2
2126-
resolution: "@jupyter/ydoc@npm:1.0.2"
2127-
dependencies:
2128-
"@jupyterlab/nbformat": ^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0
2129-
"@lumino/coreutils": ^1.11.0 || ^2.0.0
2130-
"@lumino/disposable": ^1.10.0 || ^2.0.0
2131-
"@lumino/signaling": ^1.10.0 || ^2.0.0
2132-
y-protocols: ^1.0.5
2133-
yjs: ^13.5.40
2134-
checksum: 739f9630940466b3cfcd7b742dd06479f81772ca13f863d057af0bbb5e318829506969066ab72977e7c721644982b5c8f88cf44e1ae81955ed1c27e87632d1f2
2135-
languageName: node
2136-
linkType: hard
2137-
21382124
"@jupyterlab/application@npm:^3.0.0 || ^4.0.0, @jupyterlab/application@npm:^4.0.0, @jupyterlab/application@npm:^4.0.7":
21392125
version: 4.0.7
21402126
resolution: "@jupyterlab/application@npm:4.0.7"
@@ -3662,7 +3648,7 @@ __metadata:
36623648
"@babel/preset-env": ^7.10.2
36633649
"@jupyter-widgets/base": ^6.0.6
36643650
"@jupyter-widgets/jupyterlab-manager": ^5.0.9
3665-
"@jupyter/ydoc": ~1.0.2
3651+
"@jupyter/ydoc": ^1.0.2
36663652
"@jupyterlab/application": ^4.0.0
36673653
"@jupyterlab/apputils": ^4.0.0
36683654
"@jupyterlab/builder": ^4.0.0

0 commit comments

Comments
 (0)