可以使用lx直接播放本地音乐 #3
Workflow file for this run
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 Beta | |
on: | |
push: | |
branches: | |
- beta | |
jobs: | |
Android: | |
name: Android | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Cache Gradle Wrapper | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Cache Gradle Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Cache Node Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-caches-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-caches- | |
- name: Install dependencies | |
run: npm ci | |
- name: Build Packages | |
run: | | |
cd android | |
echo ${{ secrets.KEYSTORE_STORE_FILE_BASE64 }} | base64 --decode > app/${{ secrets.KEYSTORE_STORE_FILE }} | |
./gradlew assembleRelease -PMYAPP_UPLOAD_STORE_FILE='${{ secrets.KEYSTORE_STORE_FILE }}' -PMYAPP_UPLOAD_KEY_ALIAS='${{ secrets.KEYSTORE_KEY_ALIAS }}' -PMYAPP_UPLOAD_STORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}' -PMYAPP_UPLOAD_KEY_PASSWORD='${{ secrets.KEYSTORE_KEY_PASSWORD }}' | |
# Push tag to GitHub if package.json version's tag is not tagged | |
- name: Get package version | |
run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV | |
- name: Generate file MD5 | |
run: | | |
cd android/app/build/outputs/apk/release | |
md5sum *.apk | |
- name: Upload Artifact arm64-v8a | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-arm64-v8a-release | |
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-arm64-v8a.apk | |
- name: Upload Artifact armeabi-v7a | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-armeabi-v7a-release | |
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-armeabi-v7a.apk | |
- name: Upload Artifact universal | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-universal-release | |
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-universal.apk | |
- name: Upload Artifact x86_64 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-x86_64-release | |
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86_64.apk | |
- name: Upload Artifact x86 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app-x86-release | |
path: android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86.apk |