Skip to content

Commit

Permalink
Add releaser CI scripts (#217)
Browse files Browse the repository at this point in the history
* Add CI scripts

* Update release script

* debug

* Bump ydoc

* Use trusted publisher

* Pin JupyterLab in UI test
  • Loading branch information
trungleduc authored Feb 6, 2024
1 parent 0056777 commit b99a21a
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 17 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: 'Step 1: Prep Release'
on:
workflow_dispatch:
inputs:
version_spec:
description: 'New Version Specifier'
default: 'next'
required: false
branch:
description: 'The branch to target'
required: false
post_version_spec:
description: 'Post Version Specifier'
required: false
since:
description: 'Use PRs with activity since this date or git reference'
required: false
since_last_stable:
description: 'Use PRs with activity since the last stable git tag'
required: false
type: boolean
jobs:
prep_release:
runs-on: ubuntu-latest
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Prep Release
id: prep-release
uses: jupyter-server/jupyter_releaser/.github/actions/prep-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
version_spec: ${{ github.event.inputs.version_spec }}
post_version_spec: ${{ github.event.inputs.post_version_spec }}
target: ${{ github.event.inputs.target }}
branch: ${{ github.event.inputs.branch }}
since: ${{ github.event.inputs.since }}
since_last_stable: ${{ github.event.inputs.since_last_stable }}

- name: '** Next Step **'
run: |
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"
53 changes: 53 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Step 2: Publish Release"
on:
workflow_dispatch:
inputs:
branch:
description: "The target branch"
required: false
release_url:
description: "The URL of the draft GitHub release"
required: false
steps_to_skip:
description: "Comma separated list of steps to skip"
required: false

jobs:
publish_release:
runs-on: ubuntu-latest
permissions:
# This is useful if you want to use PyPI trusted publisher
# and NPM provenance
id-token: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Populate Release
id: populate-release
uses: jupyter-server/jupyter_releaser/.github/actions/populate-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
branch: ${{ github.event.inputs.branch }}
release_url: ${{ github.event.inputs.release_url }}
steps_to_skip: ${{ github.event.inputs.steps_to_skip }}

- name: Finalize Release
id: finalize-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: jupyter-server/jupyter_releaser/.github/actions/finalize-release@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
release_url: ${{ steps.populate-release.outputs.release_url }}

- name: "** Next Step **"
if: ${{ success() }}
run: |
echo "Verify the final release"
echo ${{ steps.finalize-release.outputs.release_url }}
- name: "** Failure Message **"
if: ${{ failure() }}
run: |
echo "Failed to Publish the Draft Release Url:"
echo ${{ steps.populate-release.outputs.release_url }}
2 changes: 1 addition & 1 deletion .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install jupyter_packaging jupyterlab
python -m pip install jupyter_packaging "jupyterlab==4.0.12"
- name: Install the extension
run: |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"dependencies": {
"@jupyter-widgets/base": "^6.0.6",
"@jupyter-widgets/jupyterlab-manager": "^5.0.9",
"@jupyter/ydoc": "~1.0.2",
"@jupyter/ydoc": "^1.0.2",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
"@jupyterlab/cells": "^4.0.0",
Expand Down
16 changes: 1 addition & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2121,20 +2121,6 @@ __metadata:
languageName: node
linkType: hard

"@jupyter/ydoc@npm:~1.0.2":
version: 1.0.2
resolution: "@jupyter/ydoc@npm:1.0.2"
dependencies:
"@jupyterlab/nbformat": ^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0
"@lumino/coreutils": ^1.11.0 || ^2.0.0
"@lumino/disposable": ^1.10.0 || ^2.0.0
"@lumino/signaling": ^1.10.0 || ^2.0.0
y-protocols: ^1.0.5
yjs: ^13.5.40
checksum: 739f9630940466b3cfcd7b742dd06479f81772ca13f863d057af0bbb5e318829506969066ab72977e7c721644982b5c8f88cf44e1ae81955ed1c27e87632d1f2
languageName: node
linkType: hard

"@jupyterlab/application@npm:^3.0.0 || ^4.0.0, @jupyterlab/application@npm:^4.0.0, @jupyterlab/application@npm:^4.0.7":
version: 4.0.7
resolution: "@jupyterlab/application@npm:4.0.7"
Expand Down Expand Up @@ -3662,7 +3648,7 @@ __metadata:
"@babel/preset-env": ^7.10.2
"@jupyter-widgets/base": ^6.0.6
"@jupyter-widgets/jupyterlab-manager": ^5.0.9
"@jupyter/ydoc": ~1.0.2
"@jupyter/ydoc": ^1.0.2
"@jupyterlab/application": ^4.0.0
"@jupyterlab/apputils": ^4.0.0
"@jupyterlab/builder": ^4.0.0
Expand Down

0 comments on commit b99a21a

Please sign in to comment.