diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml new file mode 100644 index 0000000..3092cf2 --- /dev/null +++ b/.github/workflows/create_release.yml @@ -0,0 +1,60 @@ +name: Create Release +on: + workflow_dispatch: + +env: + VERSION: ${{ vars.VERSION }} + DESKTOP_VERSION: ${{ vars.DESKTOP_VERSION }} + VERSION_CODE: ${{ vars.VERSION_CODE }} + IS_DEBUG: ${{ vars.IS_DEBUG }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + SENTRY_ENVIRONMENT: ${{ vars.SENTRY_ENVIRONMENT }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + +concurrency: + group: create-release-${{ github.ref }} + cancel-in-progress: true + +jobs: + run-checks: + runs-on: macos-latest + environment: production + steps: + + - name: Checkout Branch + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + + - name: Configure signing keys + env: + KEYSTORE: ${{ secrets.KEYSTORE }} + run: | + mkdir release; + echo $KEYSTORE | base64 -d > release/release.jks; + - name: Run DB Checks + run: | + ./gradlew generateCommonMainNinjaDatabaseSchema; + ./gradlew verifySqlDelightMigration; + + - name: Build Release + run: ./gradlew :androidApp:bundleRelease :androidApp:assembleRelease + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: Signed Builds + path: | + androidApp/build/outputs/bundle/release/androidApp-release.aab + androidApp/build/outputs/apk/release/androidApp-release.apk + androidApp/build/outputs/mapping/release/mapping.txt + + diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index 8fd8673..31aae4d 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -8,9 +8,10 @@ env: DESKTOP_VERSION: ${{ vars.DESKTOP_VERSION }} VERSION_CODE: ${{ vars.VERSION_CODE }} IS_DEBUG: ${{ vars.IS_DEBUG }} - SENTRY_ORG: ${{ vars.SENTRY_ORG }} - SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} SENTRY_ENVIRONMENT: ${{ vars.SENTRY_ENVIRONMENT }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} concurrency: group: pr-check-${{ github.ref }} diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index f84a370..16abc75 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -23,6 +23,7 @@ sentry { autoInstallation { enabled.set(false) } + authToken = getEnv("SENTRY_AUTH_TOKEN") } android { namespace = bundleId @@ -39,7 +40,7 @@ android { create("release") { storeFile = file("$rootDir/release/release.jks") storePassword = getEnv("KEYSTORE_PASSWORD") - keyAlias = "ninja" + keyAlias = getEnv("KEY_ALIAS") keyPassword = getEnv("KEYSTORE_PASSWORD") } }