Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap support #778

Merged
merged 7 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ jobs:
name: fedora-installer-x64
path: |
dist/JupyterLab.rpm

- name: Upload Snap Installer
if: matrix.cfg.platform == 'linux-64'
uses: actions/upload-artifact@v4
id: snap-artifact
with:
name: snap-installer
path: |
dist/JupyterLab.snap

- name: Upload macOS x64 Installer
if: matrix.cfg.platform == 'osx-64'
Expand Down Expand Up @@ -241,3 +250,31 @@ jobs:
asset_name: latest.yml
tag: v${{ steps.package-info.outputs.version}}
overwrite: true

- name: Upload snap installer as Release asset
if: matrix.cfg.platform == 'linux-64' && steps.release-exists.outputs.result == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.JLAB_APP_TOKEN }}
file: dist/JupyterLab.snap
asset_name: JupyterLab-Setup.snap
tag: v${{ steps.package-info.outputs.version}}
overwrite: true

- name: Publish snap to the latest/edge channel in Snap Store
if: matrix.cfg.platform == 'linux-64'
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
with:
snap: dist/JupyterLab.snap
release: edge

- name: Publish snap to the latest/candidate channel in Snap Store
if: matrix.cfg.platform == 'linux-64' && steps.release-exists.outputs.result == 'true'
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
with:
snap: dist/JupyterLab.snap
release: candidate
29 changes: 19 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"linux": {
"target": [
"deb",
"rpm"
"rpm",
"snap"
],
"category": "Science;Development;",
"extraResources": [
Expand All @@ -93,6 +94,22 @@
"--after-install=build/linux_after_install.sh"
]
},
"rpm": {
"depends": [
"libXScrnSaver"
],
"fpm": [
"--after-install=build/linux_after_install.sh"
]
},
"snap": {
"confinement": "classic",
"base": "core22",
"environment": {
"SHELL": "/bin/bash",
"GTK_USE_PORTAL":"1"
}
},
"win": {
"target": [
"nsis"
Expand All @@ -105,14 +122,6 @@
],
"icon": "dist-resources/icons/icon.ico"
},
"rpm": {
"depends": [
"libXScrnSaver"
],
"fpm": [
"--after-install=build/linux_after_install.sh"
]
},
"nsis": {
"oneClick": "false",
"artifactName": "${productName}-Setup.${ext}",
Expand Down Expand Up @@ -224,4 +233,4 @@
"winreg": "^1.2.4",
"yargs": "^17.6.2"
}
}
}
Loading