Bump version code to 71 and version name to 0.17.4 #49
This file contains hidden or 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: Publish Android App | |
| on: | |
| push: | |
| branches: | |
| - 'release/v*.*.*' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Get updated version name and version code | |
| run: | | |
| # Extract version name from branch (removing 'bump/v' prefix) | |
| version_name=${GITHUB_REF#refs/heads/release/v} | |
| # Store values as environment variables | |
| echo "VERSION_NAME=$version_name" >> $GITHUB_ENV | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.3.0 | |
| bundler-cache: true | |
| - name: Set Up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: temurin | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| validate-wrappers: true | |
| - name: Decode keystore file | |
| uses: timheuer/base64-to-file@v2 | |
| id: keystore | |
| with: | |
| fileName: 'keystore.jks' | |
| encodedString: ${{ secrets.KEYSTORE }} | |
| - name: Decode Play API credentials file | |
| uses: timheuer/base64-to-file@v2 | |
| id: play_api_credentials | |
| with: | |
| fileName: 'play-api-credentials.json' | |
| encodedString: ${{ secrets.PLAY_API_CREDENTIALS }} | |
| - name: Build app and publish | |
| run: bundle exec fastlane publish | |
| env: | |
| TRACK: "internal" | |
| KEYSTORE: ${{ steps.keystore.outputs.filePath }} | |
| KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| PLAY_API_CREDENTIALS: ${{ steps.play_api_credentials.outputs.filePath }} | |
| - name: Rename Files | |
| run: | | |
| mv app/build/outputs/apk/release/app-arm64-v8a-release.apk app/build/outputs/apk/release/nextplayer-v${{ env.VERSION_NAME }}-arm64-v8a.apk | |
| mv app/build/outputs/apk/release/app-armeabi-v7a-release.apk app/build/outputs/apk/release/nextplayer-v${{ env.VERSION_NAME }}-armeabi-v7a.apk | |
| mv app/build/outputs/apk/release/app-universal-release.apk app/build/outputs/apk/release/nextplayer-v${{ env.VERSION_NAME }}-universal.apk | |
| mv app/build/outputs/apk/release/app-x86-release.apk app/build/outputs/apk/release/nextplayer-v${{ env.VERSION_NAME }}-x86.apk | |
| mv app/build/outputs/apk/release/app-x86_64-release.apk app/build/outputs/apk/release/nextplayer-v${{ env.VERSION_NAME }}-x86_64.apk | |
| - name: Create Draft Release | |
| id: create_draft_release | |
| uses: softprops/action-gh-release@v3 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: app/build/outputs/apk/release/nextplayer* | |
| draft: true | |
| name: v${{ env.VERSION_NAME }} | |
| generate_release_notes: true | |
| tag_name: v${{ env.VERSION_NAME }} |