Skip to content

Commit 28bec9d

Browse files
authored
Merge pull request #818 from jupyterlab/update_sync_jlab_workflow
update sync jlab version workflow
2 parents ca52849 + aadec19 commit 28bec9d

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

.github/workflows/sync_lab_release.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ permissions:
1212
jobs:
1313
check_for_lab_updates:
1414
runs-on: macos-latest
15+
defaults:
16+
run:
17+
# needed for conda to work
18+
shell: bash -el {0}
1519

1620
steps:
1721
- uses: actions/checkout@v4
@@ -29,11 +33,25 @@ jobs:
2933
run: |
3034
python -m pip install tbump
3135
36+
- name: 'Get latest JupyterLab version'
37+
uses: actions/github-script@v7
38+
id: get-latest-jupyterlab-version
39+
with:
40+
github-token: ${{ secrets.JLAB_APP_TOKEN }}
41+
script: |
42+
const releases = await github.rest.repos.listReleases({
43+
owner: "jupyterlab",
44+
repo: "jupyterlab"
45+
})
46+
const latestRelease = releases.data.find(release => release.tag_name.startsWith('v') && !(release.draft || release.prerelease))
47+
return latestRelease ? latestRelease.tag_name.substring(1) : ''
48+
result-encoding: string
49+
3250
- name: Check for new releases
3351
shell: bash
3452
run: |
3553
set -eux
36-
export LATEST=$(python scripts/get_latest_lab_version.py)
54+
export LATEST=${{ steps.get-latest-jupyterlab-version.outputs.result }}
3755
echo "latest=${LATEST}" >> $GITHUB_ENV
3856
tbump --only-patch ${LATEST}-1 --non-interactive
3957
if [[ ! -z "$(git status --porcelain package.json)" ]]; then
@@ -44,17 +62,21 @@ jobs:
4462
if: env.update_available == 'true'
4563
uses: actions/setup-node@v4
4664
with:
47-
node-version: '14.x'
65+
node-version: '20.x'
4866

4967
- name: Install npm dependencies
5068
if: env.update_available == 'true'
5169
run: |
5270
npm install --global yarn
5371
yarn install
5472
55-
- name: Install conda
73+
- uses: conda-incubator/setup-miniconda@v3
5674
if: env.update_available == 'true'
57-
uses: s-weigand/setup-conda@v1
75+
with:
76+
auto-update-conda: true
77+
auto-activate-base: true
78+
activate-environment: ""
79+
channels: conda-forge
5880

5981
- name: Install conda dependencies
6082
if: env.update_available == 'true'
@@ -67,7 +89,7 @@ jobs:
6789
- name: Update binary sign list osx-64
6890
if: env.update_available == 'true'
6991
run: |
70-
yarn clean_env_installer && conda-lock install --prefix ./env_installer/jlab_server ./env_installer/conda-osx-64.lock
92+
yarn clean_env_installer && conda-lock install --no-validate-platform --prefix ./env_installer/jlab_server ./env_installer/conda-osx-64.lock
7193
yarn update_binary_sign_list --platform osx-64
7294
7395
- name: Update binary sign list osx-arm64

scripts/get_latest_lab_version.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)