Skip to content

Commit ecae798

Browse files
committed
Update sync_lab_release.yml
1 parent ca52849 commit ecae798

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/sync_lab_release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,25 @@ jobs:
2929
run: |
3030
python -m pip install tbump
3131
32+
- name: 'Get latest JupyterLab version'
33+
uses: actions/github-script@v7
34+
id: get-latest-jupyterlab-version
35+
with:
36+
github-token: ${{ secrets.JLAB_APP_TOKEN }}
37+
script: |
38+
const releases = await github.rest.repos.listReleases({
39+
owner: "jupyterlab",
40+
repo: "jupyterlab"
41+
})
42+
const latestRelease = releases.data.find(release => release.tag_name.startsWith('v') && !(release.draft || release.prerelease))
43+
return latestRelease ? latestRelease.tag_name.substring(1) : ''
44+
result-encoding: string
45+
3246
- name: Check for new releases
3347
shell: bash
3448
run: |
3549
set -eux
36-
export LATEST=$(python scripts/get_latest_lab_version.py)
50+
export LATEST=${{ steps.get-latest-jupyterlab-version.outputs.result }}
3751
echo "latest=${LATEST}" >> $GITHUB_ENV
3852
tbump --only-patch ${LATEST}-1 --non-interactive
3953
if [[ ! -z "$(git status --porcelain package.json)" ]]; then

0 commit comments

Comments
 (0)