stages: - build - meta # Cache modules in between jobs cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ # Electron app build package: stage: build image: electronuserland/builder:wine script: - npm install - npm run build:app - npm run release - shopt -s extglob - mv ./release-builds/*.AppImage . - mv ./release-builds/*.deb . - mv ./release-builds/*.exe . - mv ./release-builds/*.exe.blockmap . - mv ./release-builds/?(beta*.yml|latest*.yml) . artifacts: name: "dist" expire_in: 1 day paths: - "*.AppImage" - "*.deb" - "*.exe" - "*.exe.blockmap" - "latest*.yml" - "beta*.yml" only: - tags deploy: image: ubuntu:latest before_script: - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - ssh-add <(echo "$SSH_PRIVATE_KEY_BASE64" | base64 --decode) - mkdir -p ~/.ssh - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config script: - ssh -t ci-user@openflexure.bath.ac.uk "touch test.txt" only: - web # Create a nupkg file for Choco package manager meta:choco: stage: meta dependencies: - package image: patrickhuber/choco-linux script: - chmod +x ./app/make-nupkg.sh - ./app/make-nupkg.sh - cd ./release-builds/choco - choco pack - cd ../../ - mv ./release-builds/choco/openflexure-ev.nuspec . - mv ./release-builds/choco/*.nupkg . - mv ./release-builds/choco/tools . artifacts: name: "openflexure-ev-choco-nupkg" paths: - ./openflexure-ev.nuspec - tools/chocolateyInstall.ps1 - ./*.nupkg only: - tags