diff --git a/.circleci/config.yml b/.circleci/config.yml index 2cb2e147..ce2922ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -162,7 +162,7 @@ jobs: openssl aes-256-cbc -d -in ./app/upload-key-encrypted.jks -k $ENCRYPT_KEY >> ./app/upload-key.jks - run: name: Publish release - command: ./gradlew publishPlayRelease --no-daemon --stacktrace --console=plain -PdisablePreDex + command: ./gradlew publishPlayRelease --no-daemon --stacktrace --console=plain -PenableCrashlytics -PdisablePreDex workflows: version: 2 diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 7c537735..00000000 --- a/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -[*] -charset=utf-8 -end_of_line=lf -insert_final_newline=Advanced -indent_style=space -indent_size=4 - -[*.json] -indent_size=2 - -[*.{kt,kts}] -disabled_rules=import-ordering,no-wildcard-imports diff --git a/.gitea/FUNDING.yml b/.gitea/FUNDING.yml deleted file mode 100644 index cdce0759..00000000 --- a/.gitea/FUNDING.yml +++ /dev/null @@ -1,4 +0,0 @@ -# These are supported funding model platforms - -github: wulkanowy -custom: https://www.paypal.com/paypalme/wulkanowy diff --git a/.gitea/ISSUE_TEMPLATE/feature_request.md b/.gitea/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 6194a41e..00000000 --- a/.gitea/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Zaproponuj nowy pomysł dla Wulkanowego -title: '' -labels: '' -assignees: '' - ---- - -** Czy Twoja prośba o funkcję jest związana z problemem? Proszę opisz.** -Jasny i zwięzły opis problemu. Np. Zawsze jestem sfrustrowany, gdy [...] - -** Opisz żądane rozwiązanie ** -Jasny i zwięzły opis tego, co chcesz, aby się wydarzyło. - -** Opisz alternatywy, które rozważałeś ** -Jasny i zwięzły opis wszelkich rozważanych alternatywnych rozwiązań lub funkcji. - -** Dodatkowy kontekst ** -Dodaj inny kontekst lub zrzuty ekranu dotyczące żądania funkcji tutaj. diff --git a/.gitea/dependabot.yml b/.gitea/dependabot.yml deleted file mode 100644 index 5cb45fc8..00000000 --- a/.gitea/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: -- package-ecosystem: gradle - directory: "/" - schedule: - interval: weekly - open-pull-requests-limit: 10 - target-branch: develop - ignore: - - dependency-name: io.github.wulkanowy:sdk - reviewers: - - Faierbel \ No newline at end of file diff --git a/.gitea/release.yml b/.gitea/release.yml deleted file mode 100644 index 8557fcea..00000000 --- a/.gitea/release.yml +++ /dev/null @@ -1,18 +0,0 @@ -changelog: - exclude: - labels: - - "release ignore" - categories: - - title: breaking changes - labels: - - major - - title: new features - labels: - - minor - - fr:approved - - title: translation updates - labels: - - translation - - title: features - labels: - - "*" diff --git a/.gitea/workflows/build_android.yml b/.gitea/workflows/build_android.yml deleted file mode 100644 index 52d083fb..00000000 --- a/.gitea/workflows/build_android.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Generate APK - -env: - main_project_module: app - -on: - pull_request: - types: - - closed - -jobs: - build: - runs-on: ubuntu-latest - - env: - RUNNER_TOOL_CACHE: /toolcache - - steps: - - name: Checkout the repository - uses: actions/checkout@v3 - - - name: Set current date as env variable - run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - - name: Set repository name as env variable - run: echo "repository_name=$(echo '${{ gitea.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV - - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: '17' - cache: 'gradle' - - - name: Set up Go environment - uses: actions/setup-go@v3 - with: - go-version: '1.22' - - - name: Get hash of Gradle files - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 - id: get-hash - with: - patterns: |- - **/*.gradle* - - - name: Cache Gradle - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ steps.get-hash.outputs.hash }} - - - name: Get app version - id: get_version - run: echo "VERSION_NAME=$(grep -m1 "versionName" app/build.gradle | awk '{print $2}' | tr -d \'\'\"\')" >> $GITHUB_ENV - - - name: Change wrapper permissions - run: chmod +x ./gradlew - - - name: Setup Android SDK - uses: android-actions/setup-android@v3 - - - name: Build debug APK - run: ./gradlew assembleDebug - - - name: Upload artifacts - uses: actions/upload-artifact@v3 # not v4 because of GHES - with: - name: wulkanowy_mod_debug_builds - path: | - app/build/outputs/**/*-debug.apk - - - name: Create release - uses: akkuman/gitea-release-action@v1 - env: - NODE_OPTIONS: '--experimental-fetch' - with: - files: | - app/build/outputs/**/*-debug.apk - - name: Release ${{ env.VERSION_NAME }} (${{ env.date_today }}) - tag_name: v${{ env.VERSION_NAME }} \ No newline at end of file diff --git a/.gitea/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE.md similarity index 61% rename from .gitea/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE.md index 237721cb..27d57f59 100644 --- a/.gitea/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,12 +1,3 @@ ---- -name: Bug report -about: Utwórz raport błędu, aby pomóc nam ulepszyć Wulkanowego -title: '' -labels: '' -assignees: '' - ---- - ## Co powinno się dziać diff --git a/.github/workflows/deploy-store.yml b/.github/workflows/deploy-store.yml new file mode 100644 index 00000000..3cd08e04 --- /dev/null +++ b/.github/workflows/deploy-store.yml @@ -0,0 +1,75 @@ +name: Deploy to app stores + +on: + release: + types: [ created ] + +jobs: + + deploy-google-play: + name: Deploy to google play + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: google-play + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Decrypt keys + env: + ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }} + SERVICES_ENCRYPT_KEY: ${{ secrets.SERVICES_ENCRYPT_KEY }} + run: | + gpg --yes --batch --passphrase=$SERVICES_ENCRYPT_KEY ./app/src/release/google-services.json.gpg + gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/key.p12.gpg + gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg + - name: Upload apk to google play + env: + PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }} + PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }} + PLAY_SERVICE_ACCOUNT_EMAIL: ${{ secrets.PLAY_SERVICE_ACCOUNT_EMAIL }} + PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }} + run: ./gradlew publishPlayRelease -PenableFirebase --stacktrace; + + deploy-app-gallery: + name: Deploy to AppGallery + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: app-gallery + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Decrypt keys + env: + ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }} + SERVICES_ENCRYPT_KEY: ${{ secrets.SERVICES_ENCRYPT_KEY }} + run: | + gpg --yes --batch --passphrase=$SERVICES_ENCRYPT_KEY ./app/src/release/agconnect-services.json.gpg + gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/key.p12.gpg + gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg + - name: Build HMS version + env: + PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }} + PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }} + PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }} + run: ./gradlew assembleHmsRelease --stacktrace + - name: Upload APK to AppGallery + env: + AGC_CLIENT_ID: ${{ secrets.AGC_CLIENT_ID }} + AGC_CLIENT_SECRET: ${{ secrets.AGC_CLIENT_SECRET }} + run: ./gradlew publishHuaweiAppGalleryHmsRelease --stacktrace; diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml new file mode 100644 index 00000000..88edca05 --- /dev/null +++ b/.github/workflows/deploy-test.yml @@ -0,0 +1,144 @@ +name: Deploy to app tests + +on: + push: +# branches: [ develop ] + branches: [ '!*' ] + pull_request_target: +# branches: [ develop ] + branches: [ '!*' ] + + workflow_dispatch: + +jobs: + + deploy-appcenter: + name: App Center + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: app-center + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} + - name: Set run number with offset + env: + BUILD_NUMBER_OFFSET: ${{ secrets.BUILD_NUMBER_OFFSET }} + run: echo "RUN_NUMBER=$((GITHUB_RUN_NUMBER+BUILD_NUMBER_OFFSET))" >> $GITHUB_ENV + - name: Prepare build configuration + run: | + sed -i -e "s#applicationIdSuffix \".dev\"#applicationIdSuffix \".${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/build.gradle + sed -i -e "s#.dev\"#.${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/src/debug/google-services.json + sed -i -e "s#.dev\"#.${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/src/debug/agconnect-services.json + sed -i -e '/versionNameSuffix/d' app/build.gradle + - name: Add signing config + run: | + cat >> app/build.gradle <> $GITHUB_ENV + - name: Add signing config + run: | + cat >> app/build.gradle <