feat: 编写workflow
This commit is contained in:
parent
fe3c7e9b90
commit
922b4ca949
|
|
@ -0,0 +1,37 @@
|
||||||
|
name: Build and Package Android AAR
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up JDK 11
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
java-version: '11'
|
||||||
|
|
||||||
|
- name: Install Android SDK
|
||||||
|
run: |
|
||||||
|
echo "sdk.dir=$ANDROID_HOME" > local.properties
|
||||||
|
yes | sdkmanager --licenses
|
||||||
|
sdkmanager "platform-tools" "platforms;android-30" "build-tools;30.0.3"
|
||||||
|
|
||||||
|
- name: Cache Gradle packages
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.gradle
|
||||||
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gradle-
|
||||||
|
|
||||||
|
- name: Build with Gradle Debug
|
||||||
|
run: ./gradlew library:publishDebugPublicationToDebugRepoRepository
|
||||||
Loading…
Reference in New Issue