88 # https://github.com/pre-commit/action
99 pre-commit :
1010 name : Lint
11- runs-on : ubuntu-22 .04
11+ runs-on : ubuntu-24 .04
1212 steps :
13- - uses : actions/checkout@v4
14- - uses : actions/setup-python@v5
13+ - uses : actions/checkout@v5
14+ - uses : actions/setup-python@v6
1515 with :
16- python-version : ' 3.12 '
16+ python-version : ' 3.13 '
1717 - uses : pre-commit/action@v3.0.1
1818
1919 # Due to complications in the build process when trying to support both JupyterLab
2020 # 2 and 3 we build the pypi packages with JupyterLab 3, but test on 2 and 3
2121
2222 build :
2323 name : Build dist
24- runs-on : ubuntu-22 .04
24+ runs-on : ubuntu-24 .04
2525 steps :
26- - uses : actions/checkout@v4
26+ - uses : actions/checkout@v5
2727
28- - uses : actions/setup-python@v5
28+ - uses : actions/setup-python@v6
2929 with :
30- python-version : ' 3.10 '
30+ python-version : ' 3.13 '
3131 cache : pip
3232 cache-dependency-path : ' dev-requirements*'
3333
34- - uses : actions/setup-node@v4
34+ - uses : actions/setup-node@v5
3535 with :
36- node-version : ' 20 .x'
36+ node-version : ' 24 .x'
3737 cache : yarn
3838
3939 - name : Install dependencies
@@ -74,28 +74,26 @@ jobs:
7474 fail-fast : false
7575 matrix :
7676 include :
77- - python-version : ' 3.7'
78- jupyterlab-major : ' 3'
79- - python-version : ' 3.10'
77+ - python-version : ' 3.8'
8078 jupyterlab-major : ' 4'
81- - python-version : ' 3.12 '
79+ - python-version : ' 3.13 '
8280 jupyterlab-major : ' 4'
83- runs-on : ubuntu-22 .04
81+ runs-on : ubuntu-24 .04
8482 # Includes geckdriver and firefox
8583 # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
8684 steps :
87- - uses : actions/checkout@v4
85+ - uses : actions/checkout@v5
8886
8987 - name : Set up Python ${{ matrix.python-version }}
90- uses : actions/setup-python@v5
88+ uses : actions/setup-python@v6
9189 with :
9290 python-version : ${{ matrix.python-version }}
9391 cache : pip
9492 cache-dependency-path : ' dev-requirements*'
9593
96- - uses : actions/setup-node@v4
94+ - uses : actions/setup-node@v5
9795 with :
98- node-version : ' 20 .x'
96+ node-version : ' 24 .x'
9997 cache : yarn
10098
10199 - name : Download artifacts from build
@@ -117,41 +115,52 @@ jobs:
117115 # Only publish if other jobs passed
118116 - pre-commit
119117 - test
120- runs-on : ubuntu-22 .04
118+ runs-on : ubuntu-24 .04
121119 permissions :
122120 id-token : write
123121 steps :
124122 - name : Download artifacts from build
125- uses : actions/download-artifact@v4
123+ uses : actions/download-artifact@v5
126124 with :
127125 name : dist
128126 path : dist
129127
130128 - name : Publish to PyPI
131129 if : startsWith(github.ref, 'refs/tags')
132- uses : pypa/gh-action-pypi-publish@v1.12.4
130+ uses : pypa/gh-action-pypi-publish@v1.13.0
133131
134132 # https://docs.github.com/en/actions/language-and-framework-guides/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
135133 publish-npm :
136134 needs :
137135 # Only publish if other jobs passed
138136 - pre-commit
139137 - test
140- runs-on : ubuntu-22 .04
138+ runs-on : ubuntu-24 .04
141139 steps :
142140 # Setup .npmrc file to publish to npm
143- - uses : actions/setup-node@v4
141+ - uses : actions/setup-node@v5
144142 with :
145- node-version : ' 20 .x'
143+ node-version : ' 24 .x'
146144 registry-url : https://registry.npmjs.org
147145
146+ - name : Should this be set as latest
147+ run : |
148+ if [[ ${{ github.ref }} =~ ^refs/tags/v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
149+ NPM_TAG=latest
150+ else
151+ NPM_TAG=dev
152+ fi
153+ echo "NPM_TAG=$NPM_TAG" >> "$GITHUB_ENV"
154+
148155 - name : Download artifacts from build
149- uses : actions/download-artifact@v4
156+ uses : actions/download-artifact@v5
150157 with :
151158 name : jsdist
152159 path : jsdist
153- - run : npm publish --dry-run ./jsdist/jupyter-offlinenotebook-jlpmpack.tgz
154- - run : npm publish ./jsdist/jupyter-offlinenotebook-jlpmpack.tgz
160+
161+ - run : npm publish --tag "$NPM_TAG" --dry-run ./jsdist/jupyter-offlinenotebook-jlpmpack.tgz
162+
163+ - run : npm publish --tag "$NPM_TAG" ./jsdist/jupyter-offlinenotebook-jlpmpack.tgz
155164 if : startsWith(github.ref, 'refs/tags')
156165 env :
157166 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments