This commit is contained in:
Pierre Ossman
2020-07-03 16:06:08 +02:00
4 changed files with 39 additions and 8 deletions
+31 -1
View File
@@ -5,7 +5,7 @@ on:
types: [published]
jobs:
build:
npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -14,3 +14,33 @@ jobs:
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ !github.event.release.prerelease }}
- run: npm publish --access public --tag beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ github.event.release.prerelease }}
snap:
runs-on: ubuntu-latest
container: snapcore/snapcraft
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: npm install
- run: ./utils/use_require.js --clean --as commonjs --with-app
- run: |
cp utils/launch.sh build/launch.sh
cp snap/local/svc_wrapper.sh build/svc_wrapper.sh
- run: |
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4)
echo $VERSION
sed -i "s/@VERSION@/$VERSION/g" snap/snapcraft.yaml
- run: snapcraft
- run: |
mkdir .snapcraft
echo ${SNAPCRAFT_LOGIN} | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg
env:
SNAPCRAFT_LOGIN: ${{secrets.SNAPCRAFT_LOGIN}}
- run: snapcraft push --release=stable *.snap
if: ${{ !github.event.release.prerelease }}
- run: snapcraft push --release=beta *.snap
if: ${{ github.event.release.prerelease }}
-1
View File
@@ -1 +0,0 @@
1.1.0
@@ -24,6 +24,6 @@ snapctl get services | jq -c '.[]' | while read service; do # for each service t
echo "novnc: not starting service ${service} with listen_port ${listen_port} and vnc_host_port ${vnc_host_port}"
else
# start (and fork with '&') the service using the specified listen port and VNC host:port
$SNAP/utils/launch.sh --listen $listen_port --vnc $vnc_host_port &
$SNAP/launch.sh --listen $listen_port --vnc $vnc_host_port &
fi
done
+7 -5
View File
@@ -1,17 +1,19 @@
name: novnc
base: core18 # the base snap is the execution environment for this snap
version: '1.1.0'
version: '@VERSION@'
summary: Open Source VNC client using HTML5 (WebSockets, Canvas)
description: |
Open Source VNC client using HTML5 (WebSockets, Canvas).
noVNC is both a VNC client JavaScript library as well as an application built on top of that library. noVNC runs well in any modern browser including mobile browsers (iOS and Android).
noVNC is both a VNC client JavaScript library as well as an
application built on top of that library. noVNC runs well in any
modern browser including mobile browsers (iOS and Android).
grade: stable
confinement: strict
parts:
novnc:
source: https://github.com/novnc/noVNC.git #https://github.com/novnc/noVNC/archive/v$SNAPCRAFT_PROJECT_VERSION.tar.gz
source: build/
plugin: dump
stage-packages:
- websockify
@@ -26,9 +28,9 @@ hooks:
apps:
novnc:
command: utils/launch.sh
command: ./launch.sh
plugs: [network, network-bind]
novncsvc:
command: utils/svc_wrapper.sh
command: ./svc_wrapper.sh
daemon: forking
plugs: [network, network-bind]