From 34fc6db9180c43505dd772102f2809d12de78a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ce=C4=BEuch?= Date: Tue, 2 Jul 2024 13:31:24 +0200 Subject: [PATCH] mv eidmsdk secret token from gradle build (#28) * mv eidmsdk secret token from gradle build * use github token to download eidmsdk pkg * use personal pat for eidmsdk * add info about gh pat env to readme --- .github/workflows/android_package.yaml | 2 ++ README.md | 2 ++ android/build.gradle | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android_package.yaml b/.github/workflows/android_package.yaml index 6d9c927..b4da0b1 100644 --- a/.github/workflows/android_package.yaml +++ b/.github/workflows/android_package.yaml @@ -68,6 +68,7 @@ jobs: AVM_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_PASSWORD }} AVM_KEY_ALIAS: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_ALIAS }} AVM_KEY_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEY_PASSWORD }} + EIDMSDK_ACCESS_TOKEN: ${{ secrets.GH_PAT }} working-directory: ./app run: flutter build appbundle --release @@ -77,6 +78,7 @@ jobs: AVM_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_PASSWORD }} AVM_KEY_ALIAS: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_ALIAS }} AVM_KEY_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEY_PASSWORD }} + EIDMSDK_ACCESS_TOKEN: ${{ secrets.GH_PAT }} working-directory: ./app run: flutter build apk --release diff --git a/README.md b/README.md index 1441f22..f981baa 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,8 @@ fvm dart run build_runner build --delete-conflicting-outputs Build **Android** APK: +eid-mSDK binaries are hosted on GitHub package registry. To access the package during build process environment variable `EIDMSDK_ACCESS_TOKEN` needs to be set to a GitHub Personal Access Token that has permission to read package registry. + ```shell fvm flutter build apk ``` diff --git a/android/build.gradle b/android/build.gradle index 9298f83..d22d8a6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -18,7 +18,7 @@ allprojects { url = "https://maven.pkg.github.com/eIDmSDK/eID-mSDK-Android/" credentials { username = "eIDmSDK" - password = "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" + password = System.getenv("EIDMSDK_ACCESS_TOKEN") } } }