diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c3690a8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,14 @@ +name: Continous Integration + +on: + pull_request: + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: snapcore/action-build@v1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..5e69617 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +name: Store Publishing + +on: + push: + branches: + - main + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: snapcore/action-build@v1 + id: build + - uses: snapcore/action-publish@v1 + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }} + with: + snap: ${{ steps.build.outputs.snap }} + release: stable diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d294450 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.snap diff --git a/README.md b/README.md index 1e49d5d..acddb50 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ -# theia-ide-snap -Snap Package for the Theia IDE. +# Theia IDE Snap Package + +[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/theia-ide) + +## Install [![theia-ide](https://snapcraft.io/theia-ide/badge.svg)](https://snapcraft.io/theia-ide) + + sudo snap install theia-ide --classic + +([Don't have snapd installed?](https://snapcraft.io/docs/core/install)) + +## Development + + snapcraft + sudo snap install theia-ide*.snap --dangerous --classic diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000..5164c14 --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,55 @@ +name: theia-ide +version: 1.52.0 +license: EPL-2.0 AND GPL-2.0-with-classpath-exception AND MIT +website: https://theia-ide.org/ +source-code: https://github.com/eclipse-theia +donation: https://www.eclipse.org/sponsor/ide/ +summary: Eclipse Theia IDE +description: + Open, Flexible and Extensible Cloud & Desktop IDE + +base: core24 +grade: stable +confinement: classic +compression: lzo + +platforms: + amd64: + build-on: amd64 + build-for: amd64 + +apps: + theia-ide: + command: opt/TheiaIDE/theia-ide-electron-app + desktop: usr/share/applications/theia-ide-electron-app.desktop + common-id: theia-ide-electron-app.desktop + +parts: + theia-ide: + source: https://download.eclipse.org/theia/ide/1.52.0/linux/TheiaIDE.deb + plugin: dump + source-type: deb + override-prime: | + craftctl default + mkdir -p $SNAPCRAFT_PRIME/usr/share/icons/hicolor/512x512/apps/ + mv $SNAPCRAFT_PRIME/usr/share/icons/hicolor/0x0/apps/theia-ide-electron-app.png $SNAPCRAFT_PRIME/usr/share/icons/hicolor/512x512/apps/theia-ide-electron-app.png + sed -i -Ee 's|^Icon=(.*)$|Icon=/usr/share/icons/hicolor/512x512/apps/\1.png|' $SNAPCRAFT_PRIME/usr/share/applications/theia-ide-electron-app.desktop + stage-packages: + - libx11-6 + - libxcomposite1 + - libxdamage1 + - libxext6 + - libxfixes3 + - libxrandr2 + - libasound2t64 + - libatk1.0-0t64 + - libatk-bridge2.0-0t64 + - libatspi2.0-0t64 + - libcairo2 + - libcups2t64 + - libgbm1 + - libgtk-3-0t64 + - libnspr4 + - libnss3 + - libpango-1.0-0 + - libxcb1