Skip to content

将 media3 版本升到 1.5.0-alpha01 #95

将 media3 版本升到 1.5.0-alpha01

将 media3 版本升到 1.5.0-alpha01 #95

Workflow file for this run

name: Feature Build
on:
push:
branches:
- 'feature/**'
jobs:
build-alpha:
name: Build Feature Apk
runs-on: macos-latest
if: github.repository == 'aaa1115910/bv'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
submodules: 'true'
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Write google-services.json
env:
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $DATA > app/google-services.json
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Add signing properties
env:
SIGNING_PROPERTIES: ${{ secrets.SIGNING_PROPERTIES }}
run: |
echo ${{ secrets.SIGNING_PROPERTIES }} > encoded_signing_properties
base64 -Dd -i encoded_signing_properties > signing.properties
- name: Add jks file
run: |
echo ${{ secrets.SIGN_KEY }} > ./encoded_key
base64 -Dd -i encoded_key > key.jks
- name: Build apk
run: ./gradlew assembleDefaultAlpha assembleDefaultDebug
- name: Read alpha apk output metadata
id: apk-meta-alpha
uses: juliangruber/read-file-action@v1
with:
path: app/build/outputs/apk/default/alpha/output-metadata.json
- name: Read alpha debug apk output metadata
id: apk-meta-alpha-debug
uses: juliangruber/read-file-action@v1
with:
path: app/build/outputs/apk/default/debug/output-metadata.json
- name: Parse apk infos
id: apk-infos
run: |
echo "alpha_info_version_code=${{ fromJson(steps.apk-meta-alpha.outputs.content).elements[0].versionCode }}" >> $GITHUB_ENV
echo "alpha_info_version_name=${{ fromJson(steps.apk-meta-alpha.outputs.content).elements[0].versionName }}" >> $GITHUB_ENV
echo "alpha_debug_info_version_code=${{ fromJson(steps.apk-meta-alpha-debug.outputs.content).elements[0].versionCode }}" >> $GITHUB_ENV
echo "alpha_debug_info_version_name=${{ fromJson(steps.apk-meta-alpha-debug.outputs.content).elements[0].versionName }}" >> $GITHUB_ENV
# upload artifacts alpha debug
- name: Archive alpha debug build artifacts
uses: actions/upload-artifact@v4
with:
name: Alpha debug build artifact
path: app/build/outputs/apk/default/debug/BV_${{ env.alpha_debug_info_version_code }}_${{ env.alpha_debug_info_version_name }}_default_universal.apk
# upload artifacts alpha
- name: Archive alpha build mappings
uses: actions/upload-artifact@v4
with:
name: Alpha build mappings
path: app/build/outputs/mapping/defaultAlpha
- name: Archive alpha build artifacts
uses: actions/upload-artifact@v4
with:
name: Alpha build artifact
path: app/build/outputs/apk/default/alpha/BV_${{ env.alpha_info_version_code }}_${{ env.alpha_info_version_name }}_default_universal.apk