Skip to content

开源项目效果展示 #31

开源项目效果展示

开源项目效果展示 #31

## 1
name: Test and deploy
## Actions that will be executed when you push code currently none
on:
push:
branches: [ master ]
# tags:
# - 'v*'
## 2
jobs:
## 3
# unit_tests:
# runs-on: [ubuntu-latest]
# steps:
# - uses: actions/checkout@v2
#
# - name: Unit tests
# run: ./gradlew test
## 4
# android_tests:
# runs-on: [ macos-latest ]
# steps:
# - uses: actions/checkout@v2
#
# - name: Instrumentation Tests
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 29
# script: ./gradlew connectedAndroidTest
build:
# needs: [ unit_tests, android_tests ]
runs-on: ubuntu-latest
steps:
# 1
- name: Checkout code
uses: actions/checkout@v2
#1.1
- name: Make Gradle executable
run: chmod +x ./gradlew
# 2
- name: Generate Release APK
run: ./gradlew assembleRelease
# 3
- name: Sign APK
uses: r0adkll/sign-android-release@v1
# ID used to access action output
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
# 4
- uses: actions/upload-artifact@master
with:
name: release.apk
path: ${{steps.sign_app.outputs.signedReleaseFile}}
# 5
- uses: actions/upload-artifact@master
with:
name: mapping.txt
path: app/build/outputs/mapping/release/mapping.txt