Commit bce86d32 authored by Skylot's avatar Skylot

build: check env variables for deploy stages (i.e skip deploy in forks)

parent a4a8b05e
......@@ -12,8 +12,7 @@ before_install:
- chmod +x gradlew
# override install to skip 'gradle assemble'
install:
- true
install: true
env:
global:
......@@ -21,34 +20,21 @@ env:
- JADX_LAST_TAG=$(git describe --abbrev=0 --tags)
- JADX_VERSION="${JADX_LAST_TAG:1}-b$TRAVIS_BUILD_NUMBER-$(git rev-parse --short HEAD)"
matrix:
jdk:
- openjdk8
- oraclejdk8
- openjdk11
script: ./gradlew clean build
jobs:
include:
- env: JDK=oracle-8
jdk: oraclejdk8
- env: JDK=openjdk11
jdk: openjdk11
script:
- java -version
- ./gradlew clean build
deploy:
- provider: script
skip_cleanup: true
on:
branch: master
tags: false
condition: $JDK = oracle-8
script: bash scripts/travis-master.sh
- provider: script
skip_cleanup: true
on:
branch: release
tags: false
condition: $JDK = oracle-8
script: bash scripts/travis-release.sh
notifications:
email:
- skylot@gmail.com
- stage: deploy-unstable
jdk: openjdk8
if: branch = master AND env(BINTRAY_USER) IS present
script: bash scripts/travis-master.sh
- stage: deploy-release
jdk: openjdk8
if: branch = release AND env(GH_TOKEN) IS present
script: bash scripts/travis-release.sh
#!/usr/bin/env bash
set -xe
set -e
export JFROG_CLI_OFFER_CONFIG=false
export JFROG_CLI_LOG_LEVEL=DEBUG
npm install -g jfrog-cli-go
TARGET=skylot/jadx/${BINTRAY_PACKAGE}/v${JADX_VERSION}
CREDENTIALS="--user=skylot --key=${BINTRAY_KEY}"
TARGET=${BINTRAY_USER}/jadx/${BINTRAY_PACKAGE}/v${JADX_VERSION}
CREDENTIALS="--user=${BINTRAY_USER} --key=${BINTRAY_KEY}"
jfrog bt version-create ${TARGET} ${CREDENTIALS} --desc=${JADX_VERSION}
jfrog bt upload 'build/jadx.*\.(zip|exe)' ${TARGET} ${CREDENTIALS} --regexp=true --publish=true
......
#!/usr/bin/env bash
set -xe
set -e
# upload coverage to codecov
./gradlew clean build jacocoTestReport
......
#!/usr/bin/env bash
set -xe
set -e
npm install -g semantic-release
npm install -g semantic-release/exec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment