diff --git a/.github/workflows/Android-CI-release.yml b/.github/workflows/Android-CI-release.yml new file mode 100644 index 00000000..77844078 --- /dev/null +++ b/.github/workflows/Android-CI-release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + build: + name: Publish release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: Install JDK ${{ matrix.java_version }} + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Get the version + id: tagger + uses: jimschubert/query-tag-action@v2 + with: + skip-unshallow: 'true' + abbrev: false + commit-ish: HEAD + - name: Install Android SDK + uses: malinskiy/action-android/install-sdk@release/0.1.1 + - name: Build project + run: ./gradlew clean build + env: + VERSION: ${{ github.ref }} + - run: | + assetsAAR=$(find . -name *release.aar | while read -r asset ; do echo "-a $asset" ; done) + hub release create ${assetsAAR} -m ${{steps.tagger.outputs.tag}} ${{steps.tagger.outputs.tag}} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ github.ref }} diff --git a/README.md b/README.md index 4931ec76..d7f4ee85 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # ipcam-view ![ipcam-view](images/logo.png) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-ipcam--view-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/3358) -[![Download](https://api.bintray.com/packages/niqdev/maven/mjpeg-view/images/download.svg)](https://bintray.com/niqdev/maven/mjpeg-view/_latestVersion) Android MJPEG video streaming made simple! diff --git a/bintray.gradle b/bintray.gradle deleted file mode 100644 index 4a36e54d..00000000 --- a/bintray.gradle +++ /dev/null @@ -1,85 +0,0 @@ -// ./gradlew build -// ./gradlew bintrayUpload - -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' - -def siteUrl = 'https://github.com/niqdev/ipcam-view' -def gitUrl = 'https://github.com/niqdev/ipcam-view.git' -def libraryName = 'mjpeg-view' - -install { - repositories.mavenInstaller { - // generates POM.xml with proper parameters - pom { - project { - name libraryName - description 'Android Mjpeg video streaming' - url siteUrl - - packaging 'aar' - groupId project.group - artifactId libraryName - version project.version - - licenses { - license { - name 'MIT' - url 'https://github.com/niqdev/ipcam-view/blob/master/LICENSE' - } - } - developers { - developer { - id 'niqdev' - name 'niqdev' - } - } - scm { - connection gitUrl - developerConnection gitUrl - url siteUrl - } - } - } - } -} - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' -} - -task javadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -artifacts { - archives javadocJar - archives sourcesJar -} - -bintray { - // to use it, you need environment variables. With this, everyone can build it out of the box - user = System.getenv("bintray.user") - key = System.getenv("bintray.apikey") - - configurations = ['archives'] - pkg { - repo = 'maven' - name = libraryName - version { - name = project.version - released = new Date() - } - websiteUrl = siteUrl - vcsUrl = gitUrl - licenses = ['MIT'] - publish = true - } -} diff --git a/build.gradle b/build.gradle index cc255001..b6cad6de 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,6 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5' } } diff --git a/mjpeg-view/build.gradle b/mjpeg-view/build.gradle index aad98b9f..66ab9e76 100644 --- a/mjpeg-view/build.gradle +++ b/mjpeg-view/build.gradle @@ -43,8 +43,6 @@ dependencies { api 'io.reactivex:rxandroid:1.2.1' } -apply from: '../bintray.gradle' - task hello(dependsOn: build) { println '' println ' _ _ _ _ _ _ _ '