feat(build): use semantic-release for automatic release publishing
This commit is contained in:
@@ -18,6 +18,7 @@ build/
|
||||
classes/
|
||||
idea/
|
||||
.gradle/
|
||||
node_modules/
|
||||
|
||||
jadx-output/
|
||||
*-tmp/
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
branch: release
|
||||
verifyConditions:
|
||||
- '@semantic-release/github'
|
||||
prepare:
|
||||
- path: '@semantic-release/exec'
|
||||
cmd: "JADX_VERSION=${nextRelease.version} ./gradlew clean dist"
|
||||
publish:
|
||||
- path: '@semantic-release/exec'
|
||||
cmd: "JADX_VERSION=${nextRelease.version} BINTRAY_PACKAGE=releases bash scripts/bintray-upload.sh"
|
||||
- path: '@semantic-release/github'
|
||||
assets:
|
||||
- path: 'build/*.zip'
|
||||
label: 'zip bundle'
|
||||
- path: 'build/*.exe'
|
||||
label: 'jadx-gui windows'
|
||||
|
||||
+22
-21
@@ -2,6 +2,12 @@ language: java
|
||||
sudo: false
|
||||
dist: trusty
|
||||
|
||||
# don't build on tag push
|
||||
if: tag IS blank
|
||||
|
||||
git:
|
||||
depth: false
|
||||
|
||||
before_install:
|
||||
- wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
|
||||
- chmod +x gradlew
|
||||
@@ -9,6 +15,7 @@ before_install:
|
||||
env:
|
||||
global:
|
||||
- TERM=dumb
|
||||
- JADX_VERSION="$(git describe --abbrev=0 --tags)-b$TRAVIS_BUILD_NUMBER-$(git rev-parse --short HEAD)"
|
||||
|
||||
matrix:
|
||||
include:
|
||||
@@ -19,30 +26,24 @@ matrix:
|
||||
|
||||
script:
|
||||
- java -version
|
||||
- sed -i " 1 s/.*/&-b$TRAVIS_BUILD_NUMBER-$(git rev-parse --short HEAD)/" version
|
||||
- cat version
|
||||
- sed -i "s/BUILD_VERSION/$(head -c -1 version)/g" bintray.json
|
||||
- ./gradlew clean build
|
||||
|
||||
after_success:
|
||||
- test $JDK = "oracle-8" && ./gradlew clean build jacocoTestReport && bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
|
||||
- test $JDK = "oracle-8" && ./gradlew clean sonarqube -Dsonar.host.url=$SONAR_HOST -Dsonar.organization=$SONAR_ORG -Dsonar.login=$SONAR_TOKEN || echo "Skip sonar build and upload"
|
||||
|
||||
before_deploy:
|
||||
- ./gradlew clean dist
|
||||
|
||||
deploy:
|
||||
provider: bintray
|
||||
edge:
|
||||
branch: v1.8.47
|
||||
file: bintray.json
|
||||
user: skylot
|
||||
key: $BINTRAY_KEY
|
||||
skip_cleanup: true
|
||||
on:
|
||||
branch: master
|
||||
tags: false
|
||||
condition: $JDK = oracle-8
|
||||
- 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:
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
[](https://codecov.io/gh/skylot/jadx)
|
||||
[](https://sonarcloud.io/dashboard?id=jadx)
|
||||
[](http://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
[](https://github.com/semantic-release/semantic-release)
|
||||
|
||||
**jadx** - Dex to Java decompiler
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"package": {
|
||||
"name": "unstable",
|
||||
"repo": "jadx",
|
||||
"subject": "skylot",
|
||||
"desc": "Unstable",
|
||||
"website_url": "https://github.com/skylot/jadx",
|
||||
"issue_tracker_url": "https://github.com/skylot/jadx/issues",
|
||||
"vcs_url": "https://github.com/skylot/jadx.git",
|
||||
"licenses": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"labels": [
|
||||
"unstable"
|
||||
],
|
||||
"public_download_numbers": true,
|
||||
"public_stats": true
|
||||
},
|
||||
"version": {
|
||||
"name": "BUILD_VERSION",
|
||||
"desc": "Dev build: BUILD_VERSION"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"includePattern": "build/(jadx.*\.(zip|exe))",
|
||||
"uploadPattern": "$1",
|
||||
"matrixParams": {
|
||||
"override": 1
|
||||
},
|
||||
"list_in_downloads": true
|
||||
}
|
||||
],
|
||||
"publish": true
|
||||
}
|
||||
+2
-1
@@ -4,8 +4,9 @@ plugins {
|
||||
id 'com.github.ben-manes.versions' version '0.20.0'
|
||||
}
|
||||
|
||||
ext.jadxVersion = file('version').readLines().get(0)
|
||||
ext.jadxVersion = System.getenv('JADX_VERSION') ?: "dev"
|
||||
version = jadxVersion
|
||||
println("jadx version: ${jadxVersion}")
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'java'
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
|
||||
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}"
|
||||
|
||||
jfrog bt version-create ${TARGET} ${CREDENTIALS} --desc=${JADX_VERSION}
|
||||
jfrog bt upload 'build/jadx.*\.(zip|exe)' ${TARGET} ${CREDENTIALS} --regexp=true --publish=true
|
||||
jfrog bt version-publish ${TARGET} ${CREDENTIALS}
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
|
||||
# upload coverage to codecov
|
||||
./gradlew clean build jacocoTestReport
|
||||
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
|
||||
|
||||
# run sonar checks
|
||||
./gradlew clean sonarqube -Dsonar.host.url=${SONAR_HOST} -Dsonar.organization=${SONAR_ORG} -Dsonar.login=${SONAR_TOKEN} || echo "Skip sonar build and upload"
|
||||
|
||||
# upload bundles to bintray unstable package
|
||||
./gradlew clean dist
|
||||
BINTRAY_PACKAGE=unstable bash scripts/bintray-upload.sh
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
|
||||
npm install -g semantic-release
|
||||
npm install -g semantic-release/exec
|
||||
semantic-release
|
||||
Reference in New Issue
Block a user