diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..9fcb455 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,26 @@ +name: integration +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Make Gradle executable + working-directory: ./AnLinux + run: chmod +x ./gradlew + + # Execute unit tests + - name: Unit Test + working-directory: ./AnLinux + run: ./gradlew testDebugUnitTest + + - name: Android Test Report + uses: asadmansr/android-test-report-action@v1.2.0 + if: ${{ always() }} # IMPORTANT: run Android Test Report regardless diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..74d0131 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Build & Release APK + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Make Gradle executable + working-directory: ./AnLinux + run: chmod +x ./gradlew + + - name: Build with Gradle + working-directory: ./AnLinux + run: ./gradlew build + + - name: Build Debug APK + working-directory: ./AnLinux + run: ./gradlew assembleDebug + + - name: Generate version.txt for Hub release + working-directory: ./AnLinux + run: ./gradlew generateVersionTxt + + - name: Releasing using Hub + uses: valley-fordham/action-release-debugapk@master + env: + GITHUB_TOKEN: ${{ secrets.TOKEN }} + APP_FOLDER: ./AnLinux/app + RELEASE_TITLE: New Release