Skip to content

Commit 660dd58

Browse files
authored
Merge pull request #778 from jupyterlab/snap-support
Snap support
2 parents f6abda8 + 0aad0cf commit 660dd58

File tree

2 files changed

+56
-10
lines changed

2 files changed

+56
-10
lines changed

.github/workflows/publish.yml

+37
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ jobs:
137137
name: fedora-installer-x64
138138
path: |
139139
dist/JupyterLab.rpm
140+
141+
- name: Upload Snap Installer
142+
if: matrix.cfg.platform == 'linux-64'
143+
uses: actions/upload-artifact@v4
144+
id: snap-artifact
145+
with:
146+
name: snap-installer
147+
path: |
148+
dist/JupyterLab.snap
140149
141150
- name: Upload macOS x64 Installer
142151
if: matrix.cfg.platform == 'osx-64'
@@ -241,3 +250,31 @@ jobs:
241250
asset_name: latest.yml
242251
tag: v${{ steps.package-info.outputs.version}}
243252
overwrite: true
253+
254+
- name: Upload snap installer as Release asset
255+
if: matrix.cfg.platform == 'linux-64' && steps.release-exists.outputs.result == 'true'
256+
uses: svenstaro/upload-release-action@v2
257+
with:
258+
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
259+
file: dist/JupyterLab.snap
260+
asset_name: JupyterLab-Setup.snap
261+
tag: v${{ steps.package-info.outputs.version}}
262+
overwrite: true
263+
264+
- name: Publish snap to the latest/edge channel in Snap Store
265+
if: matrix.cfg.platform == 'linux-64'
266+
uses: snapcore/action-publish@v1
267+
env:
268+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
269+
with:
270+
snap: dist/JupyterLab.snap
271+
release: edge
272+
273+
- name: Publish snap to the latest/candidate channel in Snap Store
274+
if: matrix.cfg.platform == 'linux-64' && steps.release-exists.outputs.result == 'true'
275+
uses: snapcore/action-publish@v1
276+
env:
277+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
278+
with:
279+
snap: dist/JupyterLab.snap
280+
release: candidate

package.json

+19-10
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
"linux": {
7979
"target": [
8080
"deb",
81-
"rpm"
81+
"rpm",
82+
"snap"
8283
],
8384
"category": "Science;Development;",
8485
"extraResources": [
@@ -93,6 +94,22 @@
9394
"--after-install=build/linux_after_install.sh"
9495
]
9596
},
97+
"rpm": {
98+
"depends": [
99+
"libXScrnSaver"
100+
],
101+
"fpm": [
102+
"--after-install=build/linux_after_install.sh"
103+
]
104+
},
105+
"snap": {
106+
"confinement": "classic",
107+
"base": "core22",
108+
"environment": {
109+
"SHELL": "/bin/bash",
110+
"GTK_USE_PORTAL":"1"
111+
}
112+
},
96113
"win": {
97114
"target": [
98115
"nsis"
@@ -105,14 +122,6 @@
105122
],
106123
"icon": "dist-resources/icons/icon.ico"
107124
},
108-
"rpm": {
109-
"depends": [
110-
"libXScrnSaver"
111-
],
112-
"fpm": [
113-
"--after-install=build/linux_after_install.sh"
114-
]
115-
},
116125
"nsis": {
117126
"oneClick": "false",
118127
"artifactName": "${productName}-Setup.${ext}",
@@ -224,4 +233,4 @@
224233
"winreg": "^1.2.4",
225234
"yargs": "^17.6.2"
226235
}
227-
}
236+
}

0 commit comments

Comments
 (0)