diff --git a/.travis.yml b/.travis.yml index 0965ca56..22e9731e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,12 @@ script: - export TRAVIS_BUILD_NUMBER="" # Override travis build number since it is uses for tagging the binary version https://github.com/electron-userland/electron-builder/issues/3730 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run -e GH_TOKEN=$GH_TOKEN -e GIT_TAG=$TRAVIS_TAG --rm -v `pwd`:/app thomasnordquist/ui-test-recording-env sh -c "cd app && docker/testMounted.sh"; fi - if [[ "$TRAVIS_TAG" != "" ]]; then yarn run prepare-release; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package linux; fi + - | + if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_TAG" != "" ]]; then + openssl aes-256-cbc -d -in res/snapstore-credentials.enc -out credentials -k $SNAPSTORE_CREDENTIALS_DECRYPTION_KEY; + snapcraft login --with credentials; + rm credentials; + yarn run package linux; + fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then yarn run package -- mac; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_TAG" != "" ]]; then unset CSC_LINK; yarn run package -- win; fi diff --git a/res/snapstore-credentials.enc b/res/snapstore-credentials.enc new file mode 100644 index 00000000..97595663 Binary files /dev/null and b/res/snapstore-credentials.enc differ diff --git a/scripts/prepare-release.ts b/scripts/prepare-release.ts index 63386669..83016450 100644 --- a/scripts/prepare-release.ts +++ b/scripts/prepare-release.ts @@ -28,7 +28,7 @@ async function prepareRelease() { // Clean up await fs.remove('node_modules') - // await exec('yarn', ['install', '--production']) // Do not clean up, electron version detection will fail otherwise + await exec('yarn', ['install', '--production']) // Do not clean up, electron version detection will fail otherwise await fs.remove(path.join('app', 'node_modules')) chdir(originalDir)