-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' of github.com:projectNEWM/newm-mobile into…
… MOBILE-220-Fix-filter-for-Songs-Under-30-Seconds * 'development' of github.com:projectNEWM/newm-mobile: Aab action flow (#324) Modify string for when a user shares a song (#322) Introduced Automatic Versioning with Manual Control Over Major Versions (#318) Add client header (#321) Migrate upload artifact to v4 (#320) Display app and build version (#319) Update repeat button color states (#317) Share button implementation (#316) Mobile 220 fix filter for songs under 30 seconds (#315)
- Loading branch information
Showing
13 changed files
with
288 additions
and
23 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Create AAB Release Bundle | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build_android_release_artifacts: | ||
if: ${{ startsWith(github.event.release.tag_name, 'androidRelease') }} | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Setup build tool version variable | ||
run: | | ||
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) | ||
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV | ||
echo Last build tool version is: $BUILD_TOOL_VERSION | ||
- name: Setup local.properties | ||
run: | | ||
echo STAGING_URL="${{ vars.STAGING_URL }}" >> ./local.properties | ||
echo PRODUCTION_URL="${{ vars.PRODUCTION_URL }}" >> ./local.properties | ||
echo GOOGLE_AUTH_CLIENT_ID="${{ vars.GOOGLE_AUTH_CLIENT_ID }}" >> ./local.properties | ||
echo "RECAPTCHA_SITE_KEY=${{ secrets.RECAPTCHA_SITE_KEY }}" >> ./local.properties | ||
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> ./local.properties | ||
echo "ANDROID_SENTRY_DSN=${{ secrets.ANDROID_SENTRY_DSN }}" >> ./local.properties | ||
echo "auth.token=${{ secrets.ANDROID_SENTRY_AUTH_TOKEN}}" >> ./sentry.properties | ||
- name: create google-services.json | ||
env: | ||
GOOGLE_SERVICES_JSON: ${{ vars.GOOGLE_SERVICES_JSON }} | ||
run: echo $GOOGLE_SERVICES_JSON > ./android/app-newm/google-services.json | ||
|
||
- name: build android apk | ||
run: ./gradlew :android:app-newm:assembleProductionRelease | ||
|
||
- name: build bundle production | ||
run: ./gradlew :android:app-newm:bundleProduction | ||
|
||
- uses: r0adkll/sign-android-release@v1 | ||
name: Sign app APK | ||
# ID used to access action output | ||
id: sign_app | ||
with: | ||
releaseDirectory: android/app-newm/build/outputs/apk/production/release | ||
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | ||
alias: ${{ secrets.KEY_ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
keyPassword: ${{ secrets.KEY_PASSWORD }} | ||
env: | ||
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | ||
|
||
- uses: r0adkll/sign-android-release@v1 | ||
name: Sing app bundle | ||
# ID used to access action output | ||
id: sign_aab | ||
with: | ||
releaseDirectory: android/app-newm/build/outputs/bundle/productionRelease | ||
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | ||
alias: ${{ secrets.KEY_ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
keyPassword: ${{ secrets.KEY_PASSWORD }} | ||
env: | ||
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: apk | ||
path: ${{steps.sign_app.outputs.signedReleaseFile}} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: aab | ||
path: ${{steps.sign_aab.outputs.signedReleaseFile}} | ||
|
||
- name: Upload artifact to Firebase App Distribution | ||
uses: wzieba/Firebase-Distribution-Github-Action@v1 | ||
with: | ||
appId: ${{secrets.FIREBASE_ANDROID_APP_ID}} | ||
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} | ||
groups: newm-team | ||
file: ${{steps.sign_app.outputs.signedReleaseFile}} |
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
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
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
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
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
25 changes: 25 additions & 0 deletions
25
...res/music-player/src/main/java/io/newm/feature/musicplayer/share/RandomPhraseGenerator.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.newm.feature.musicplayer.share | ||
|
||
import android.content.Context | ||
import io.newm.core.resources.R | ||
|
||
fun Context.getRandomSharePhrase(songTitle: String, songArtist: String, url: String): String { | ||
val phraseIds = listOf( | ||
R.string.share_phrase_1, | ||
R.string.share_phrase_2, | ||
R.string.share_phrase_3, | ||
R.string.share_phrase_4, | ||
R.string.share_phrase_5, | ||
R.string.share_phrase_6, | ||
R.string.share_phrase_7, | ||
R.string.share_phrase_8, | ||
R.string.share_phrase_9, | ||
R.string.share_phrase_10, | ||
R.string.share_phrase_11, | ||
R.string.share_phrase_12, | ||
R.string.share_phrase_13, | ||
R.string.share_phrase_14, | ||
R.string.share_phrase_15 | ||
) | ||
return this.getString(phraseIds.random(), songTitle, songArtist, url) | ||
} |
Oops, something went wrong.