修复网易云音乐hook修改机型导致澎湃系统爱心按钮和歌词按钮异常 (#249) #449
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: Android CI | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- "README.md" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Write key | |
if: ${{ github.event_name != 'pull_request' || github.ref_type == 'tag' }} | |
run: | | |
if [ ! -z "${{ secrets.SIGNING_KEY }}" ]; then | |
echo androidStorePassword='${{ secrets.KEY_STORE_PASSWORD }}' >> local.properties | |
echo androidKeyAlias='xiao_wine' >> local.properties | |
echo androidKeyPassword='${{ secrets.KEY_STORE_PASSWORD }}' >> local.properties | |
echo androidStoreFile=`pwd`/key.jks >> local.properties | |
echo ${{ secrets.SIGNING_KEY }} | base64 --decode > key.jks | |
fi | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/master' }} | |
- name: Build with Gradle | |
run: | | |
mkdir -p ./doc | |
echo "$(echo `(cat ./app/src/main/assets/app_rules.json)` | grep -o '"appRulesVersion": [0-9]*' | grep -o '[0-9]*')" > ./doc/app_rules_version | |
cp ./app/src/main/assets/app_rules.json ./doc/app_rules.json | |
wget -O ./doc/notice_list.json https://xiaowine.github.io/Lyric-Getter/notice_list.json | |
./gradlew assemble | |
./gradlew bundleRelease | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ github.token }} | |
publish_dir: ./doc | |
- name: Upload Release APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Lyric Getter release | |
path: ./app/build/outputs/apk/release | |
- name: Upload Debug APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Lyric Getter debug | |
path: ./app/build/outputs/apk/debug | |
- name: Upload Release Mapping | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Lyric Getter mapping | |
path: ./app/build/outputs/mapping/release/mapping.txt |