Skip to content

Commit

Permalink
Update sync_lab_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mbektas committed Apr 30, 2024
1 parent ca52849 commit ecae798
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/sync_lab_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,25 @@ jobs:
run: |
python -m pip install tbump
- name: 'Get latest JupyterLab version'
uses: actions/github-script@v7
id: get-latest-jupyterlab-version
with:
github-token: ${{ secrets.JLAB_APP_TOKEN }}
script: |
const releases = await github.rest.repos.listReleases({
owner: "jupyterlab",
repo: "jupyterlab"
})
const latestRelease = releases.data.find(release => release.tag_name.startsWith('v') && !(release.draft || release.prerelease))
return latestRelease ? latestRelease.tag_name.substring(1) : ''
result-encoding: string

- name: Check for new releases
shell: bash
run: |
set -eux
export LATEST=$(python scripts/get_latest_lab_version.py)
export LATEST=${{ steps.get-latest-jupyterlab-version.outputs.result }}
echo "latest=${LATEST}" >> $GITHUB_ENV
tbump --only-patch ${LATEST}-1 --non-interactive
if [[ ! -z "$(git status --porcelain package.json)" ]]; then
Expand Down

0 comments on commit ecae798

Please sign in to comment.