name: Android CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest if: ${{ !startsWith(github.event.head_commit.message, '[skip ci]') }} steps: - uses: actions/checkout@v2 with: submodules: 'recursive' - name: set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - name: Get version code run: echo APPVEYOR_BUILD_NUMBER=$(expr $GITHUB_RUN_NUMBER + 4999) >> $GITHUB_ENV - name: Build with Gradle run: bash ./gradlew zipRelease zipDebug - name: Prepare artifact if: success() run: unzip edxp-core/release/LSPosed-v*-release.zip -d LSPosed-release; unzip edxp-core/release/LSPosed-v*-debug.zip -d LSPosed-debug; - name: Upload release uses: actions/upload-artifact@v2 with: name: LSPosed-release path: './LSPosed-release/*' - name: Upload debug # if: ${{ github.event_name == 'pull_request' && success() }} uses: actions/upload-artifact@v2 with: name: LSPosed-debug path: './LSPosed-debug/*' # - name: Prepare publish artifact # if: ${{ github.event_name == 'push' && success() }} # run: mkdir -p to_publish && mv edxp-core/release/EdXposed-YAHFA-v*-release.zip to_publish/EdXposed-YAHFA-release.zip && mv edxp-core/release/EdXposed-SandHook-v*-release.zip to_publish/EdXposed-SandHook-release.zip && echo $APPVEYOR_BUILD_NUMBER > to_publish/version # - name: Publish build # if: ${{ github.event_name == 'push' && success() }} # uses: dmnemec/copy_file_to_another_repo_action@v1.0.4 # env: # API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} # with: # source_file: 'to_publish/*' # destination_repo: 'ElderDrivers/Repository-Website' # destination_folder: 'assets' # user_email: 'mlgmxyysd@meowcat.org' # user_name: 'MlgmXyysd'