diff --git a/.github/workflows/Android-CI-release.yml b/.github/workflows/Android-CI-release.yml new file mode 100644 index 00000000..64a5869c --- /dev/null +++ b/.github/workflows/Android-CI-release.yml @@ -0,0 +1,35 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + build: + name: Publish release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.2.0 + with: + fetch-depth: 0 + - name: Install JDK ${{ matrix.java_version }} + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Install Android SDK + uses: hannesa2/action-android/install-sdk@0.0.7.5 + - 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) + VERSION=$(echo $VERSION | cut -d'/' -f3) + assetsJAR=$(find . -name IOIO*${VERSION}.jar | while read -r asset ; do echo "-a $asset" ; done) + tag_name="${GITHUB_REF##*/}" + hub release create ${assetsAAR} ${assetsJAR} -m "$tag_name" "$tag_name" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ github.ref }}