Build_release_sdk #2810
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build_release_sdk | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 */12 * * *' # 分 时 日 月 周 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: "!startsWith(github.event.head_commit.message, 'GitHubAction:')" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
#cache: gradle | |
- name: Gradle cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} | |
- name: AVD cache | |
uses: actions/cache@v2 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-cache | |
- name: checkout analysys-dev-sdk and sync | |
shell: bash | |
continue-on-error: true | |
run: | | |
git clone https://oauth2:${{ secrets.GTOKEN }}@github.com/analysys-sdk/analysys-dev-sdk.git | |
echo "===========clone over====================" | |
ls | |
cd analysys-dev-sdk | |
echo "===========into analysys-dev-sdk====================" | |
ls | |
git checkout dev | |
chmod -R 777 * | |
git config core.filemode false | |
- name: Build_release_sdk | |
shell: bash | |
continue-on-error: true | |
run: | | |
cd analysys-dev-sdk | |
# prepare mdout | |
wget https://raw.githubusercontent.com/FisherWY/Shell/master/mdout/install_mdout.sh -O - | bash /dev/stdin | |
bash ./build.sh>build.txt | |
tar zcvf build_result.tgz release/ | |
- name: Send mail | |
uses: dawidd6/action-send-mail@v3 | |
with: | |
# server_address: smtp.163.com | |
# server_port: 465 | |
# server_address: smtp.gmail.com | |
# server_port: 465 | |
server_address: smtp.exmail.qq.com | |
server_port: 465 | |
username: ${{ secrets.MAILUSERNAME }} | |
password: ${{ secrets.MAILPASSWORD }} | |
subject: GithubActions[Release Build]( ${{ github.job }} ) | |
to: ${{ secrets.MAIL_LIST }} | |
from: github.com/hhhaiai | |
body: Build job ( ${{ github.job }} ) of ${{ github.repository }} completed successfully! | |
ignore_cert: true | |
priority: low | |
secure: true | |
attachments: ./analysys-dev-sdk/build.txt,./analysys-dev-sdk/build_result.tgz | |
#html_body: file://dev-sdk/build/reports/lint-results.html | |
#convert_markdown: true | |