Skip to content

Build: Prepare for v0.10.1 release (#737) #7

Build: Prepare for v0.10.1 release (#737)

Build: Prepare for v0.10.1 release (#737) #7

Workflow file for this run

name: Build Release APK and Create Draft Github Release
on:
push:
tags:
- v*
jobs:
build_and_release:
name: Build Release APK and Create Draft Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set Up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Get Tag Name
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build Release APK
run: ./gradlew assembleRelease
- name: Sign Release APK
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEYSTORE }}
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
alias: ${{ secrets.KEY_ALIAS }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Rename Files
run: |
mv app/build/outputs/apk/release/app-arm64-v8a-release-unsigned-signed.apk app/build/outputs/apk/release/nextplayer-${{ env.TAG_NAME }}-arm64-v8a.apk
mv app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned-signed.apk app/build/outputs/apk/release/nextplayer-${{ env.TAG_NAME }}-armeabi-v7a.apk
mv app/build/outputs/apk/release/app-universal-release-unsigned-signed.apk app/build/outputs/apk/release/nextplayer-${{ env.TAG_NAME }}-universal.apk
mv app/build/outputs/apk/release/app-x86-release-unsigned-signed.apk app/build/outputs/apk/release/nextplayer-${{ env.TAG_NAME }}-x86.apk
mv app/build/outputs/apk/release/app-x86_64-release-unsigned-signed.apk app/build/outputs/apk/release/nextplayer-${{ env.TAG_NAME }}-x86_64.apk
- name: Create Draft Release
id: create_draft_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: app/build/outputs/apk/release/nextplayer*
draft: true
title: Release ${{ github.ref }}
body: |
Your release notes go here.