diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index cf174cb..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Report a bug -description: | - You detected something wrong on the application. -labels: ["bug"] -body: - - type: textarea - id: steps - attributes: - label: Steps to reproduce - description: Steps to reproduce the problem you are running into. - placeholder: | - 1. ... - 2. ... - 3. ... - validations: - required: true - - type: textarea - id: expected-results - attributes: - label: Expected results - description: What is expected to happen. - validations: - required: true - - type: textarea - id: actual-results - attributes: - label: Actual results - description: What is actually happening. - validations: - required: true - - type: textarea - id: screenshots - attributes: - label: Screenshots or Video - description: | - Upload any screenshots or video of the bug. - value: | - Screenshots or video demonstration - validations: - required: true - - type: textarea - id: app-os-details - attributes: - label: App and OS details - description: | - Some details about the app version and the OS where you are running the application. - value: | - - App version: (eg: v2.16.0) - - Device OS version: (eg: Android 14) - validations: - required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request_agh.yml b/.github/ISSUE_TEMPLATE/feature_request_agh.yml deleted file mode 100644 index 55972db..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request_agh.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Request a new feature that has been added to AdGuard Home -description: | - The AdGuard Home team added recently a new feature that you want on the app. -labels: ["agh feature request"] -body: - - type: textarea - id: description - attributes: - label: Description - description: Describe the feature that you want on the app. - placeholder: | - Write the details here... - validations: - required: true - - type: textarea - id: screenshots - attributes: - label: Screenshots - description: Attach some screenshots of where that new feature is located on the web administration panel. - placeholder: | - Screenshots here. - validations: - required: true - - type: textarea - id: version-introduced - attributes: - label: Version where feature was introduced - description: Version of the AdGuard Home server where this feature was introduced. - placeholder: | - - Version: (eg: v0.107.44) - validations: - required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request_app.yml b/.github/ISSUE_TEMPLATE/feature_request_app.yml deleted file mode 100644 index 3cf08e6..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request_app.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Request a new feature or an improvement for the app itself -description: | - You want a new feature for the application, or an improvement for an existing one. -labels: ["app feature request"] -body: - - type: markdown - id: important-info - attributes: - value: | - ℹ️ IMPORTANT INFO ℹ️ - Please note that if the functionality is related to data representation, it may not be implemented, as AdGuard Home Manager depends on the capabilities of the AdGuard Home API. - - type: textarea - id: description - attributes: - label: Description - description: Describe the feature that you want on the app. - placeholder: | - Write the details here... - validations: - required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml deleted file mode 100644 index 805783f..0000000 --- a/.github/ISSUE_TEMPLATE/question.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: You have a question about the app -description: | - You want ask something that's not related with a feature request or a bug. -labels: ["question"] -body: - - type: markdown - id: important-info - attributes: - value: | - Having problems while adding a connection to a server? Check out [this guide](https://github.com/JGeek00/adguard-home-manager/wiki/Create-a-connection). - - type: textarea - id: question - attributes: - label: Question - description: Write your question here giving the maximum detail possible. - placeholder: | - Write your question here... - validations: - required: true \ No newline at end of file diff --git a/.github/workflows/release-beta.yaml b/.github/workflows/release-beta.yaml new file mode 100644 index 0000000..8f72ac4 --- /dev/null +++ b/.github/workflows/release-beta.yaml @@ -0,0 +1,123 @@ +name: Compile and release beta build + +on: + workflow_dispatch: + branches: + - beta + +jobs: + build-android: + name: Build Android .apk and .aab + runs-on: ubuntu-latest + env: + ANDROID_AAB_RELEASE_PATH: build/app/outputs/bundle/release + ANDROID_APK_RELEASE_PATH: build/app/outputs/apk/release + outputs: + VERSION_NAME: ${{ steps.save_version.outputs.version_name }} + VERSION_NUMBER: ${{ steps.save_version.outputs.version_number }} + steps: + - uses: actions/checkout@v3 + with: + ref: beta + - name: Decode android/app/keystore.jks + run: echo "${{ secrets.KEYSTORE_JKS }}" | base64 --decode > android/app/keystore.jks + - name: Decode android/key.properties + run: echo "${{ secrets.KEY_PROPERTIES }}" | base64 --decode > android/key.properties + - name: Decode .env + run: echo "${{ secrets.ENV }}" | base64 --decode > .env + - name: Read pubspec.yaml + uses: adore-me/read-yaml@v1.0.0 + id: read_pubspec + with: + file: './pubspec.yaml' + key-path: '["version"]' + - name: Save version on env variable + id: save_version + run: | + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "version_name=${split[0]}" >> $GITHUB_OUTPUT + echo "version_number=${split[1]}" >> $GITHUB_OUTPUT + - name: Update KeyStore password in gradle properties + run: sed -i 's/#{KEYSTORE_PASS}#/${{ secrets.KEYSTORE_PASS }}/g' android/key.properties + - name: Update KeyStore key password in gradle properties + run: sed -i 's/#{KEYSTORE_KEY_PASS}#/${{ secrets.KEYSTORE_KEY_PASS }}/g' android/key.properties + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '18.x' + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter clean + - run: flutter pub get + - run: flutter build apk --release + - run: flutter build appbundle --release + - name: Rename apk + run: mv $ANDROID_APK_RELEASE_PATH/app-release.apk $ANDROID_APK_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.apk + - name: Rename aab + run: mv $ANDROID_AAB_RELEASE_PATH/app-release.aab $ANDROID_AAB_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab + - name: Copy apk to project root + run: cp $ANDROID_APK_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.apk AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.apk + - name: Copy aab to project root + run: cp $ANDROID_AAB_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: android + path: | + AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab + AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.apk + release-builds-github: + name: Release beta build to GitHub + runs-on: ubuntu-latest + needs: [build-android] + env: + VERSION_NAME: ${{ needs.build-android.outputs.VERSION_NAME }} + VERSION_NUMBER: ${{ needs.build-android.outputs.VERSION_NUMBER }} + steps: + - uses: actions/checkout@v3 + with: + ref: beta + - name: Create builds directory + run: mkdir releases + - name: Download Android artifacts + uses: actions/download-artifact@v3 + with: + name: android + path: releases/ + - name: Release to GitHub + uses: ncipollo/release-action@v1 + with: + artifacts: "releases/*" + token: ${{ secrets.GH_TOKEN }} + tag: '${{ env.VERSION_NAME }}_(${{ env.VERSION_NUMBER }})' + name: v${{ env.VERSION_NAME }} + draft: true + prerelease: true + commit: ${{ github.sha }} + release-build-google-play: + name: Release Android beta build to the Google Play Store + runs-on: ubuntu-latest + needs: [build-android] + env: + VERSION_NAME: ${{ needs.build-android.outputs.VERSION_NAME }} + steps: + - uses: actions/checkout@v3 + with: + ref: beta + - name: Download Android artifacts + uses: actions/download-artifact@v3 + with: + name: android + - name: Release app to Google Play + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }} + packageName: com.jgeek00.adguard_home_manager + releaseFiles: AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab + track: beta + status: draft + releaseName: ${{ env.VERSION_NAME }} \ No newline at end of file diff --git a/.github/workflows/release-stable.yaml b/.github/workflows/release-stable.yaml new file mode 100644 index 0000000..220c56d --- /dev/null +++ b/.github/workflows/release-stable.yaml @@ -0,0 +1,302 @@ +name: Compile and release production build + +on: + workflow_dispatch: + branches: + - master + +jobs: + build-android: + name: Build Android .apk and .aab + runs-on: ubuntu-latest + env: + ANDROID_AAB_RELEASE_PATH: build/app/outputs/bundle/release + ANDROID_APK_RELEASE_PATH: build/app/outputs/apk/release + outputs: + VERSION_NAME: ${{ steps.save_version.outputs.version_name }} + VERSION_NUMBER: ${{ steps.save_version.outputs.version_number }} + steps: + - uses: actions/checkout@v3 + - name: Decode android/app/keystore.jks + run: echo "${{ secrets.KEYSTORE_JKS }}" | base64 --decode > android/app/keystore.jks + - name: Decode android/key.properties + run: echo "${{ secrets.KEY_PROPERTIES }}" | base64 --decode > android/key.properties + - name: Decode .env + run: echo "${{ secrets.ENV }}" | base64 --decode > .env + - name: Read pubspec.yaml + uses: adore-me/read-yaml@v1.0.0 + id: read_pubspec + with: + file: './pubspec.yaml' + key-path: '["version"]' + - name: Save version on env variable + id: save_version + run: | + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "version_name=${split[0]}" >> $GITHUB_OUTPUT + echo "version_number=${split[1]}" >> $GITHUB_OUTPUT + - name: Update KeyStore password in gradle properties + run: sed -i 's/#{KEYSTORE_PASS}#/${{ secrets.KEYSTORE_PASS }}/g' android/key.properties + - name: Update KeyStore key password in gradle properties + run: sed -i 's/#{KEYSTORE_KEY_PASS}#/${{ secrets.KEYSTORE_KEY_PASS }}/g' android/key.properties + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '18.x' + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter clean + - run: flutter pub get + - run: flutter build apk --release + - run: flutter build appbundle --release + - name: Rename apk + run: mv $ANDROID_APK_RELEASE_PATH/app-release.apk $ANDROID_APK_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.apk + - name: Rename aab + run: mv $ANDROID_AAB_RELEASE_PATH/app-release.aab $ANDROID_AAB_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab + - name: Copy apk to project root + run: cp $ANDROID_APK_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.apk AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.apk + - name: Copy aab to project root + run: cp $ANDROID_AAB_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: android + path: | + AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab + AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.apk + build-macos: + name: Build macOS .dmg + runs-on: macos-latest + env: + MACOS_APP_RELEASE_PATH: build/macos/Build/Products/Release + outputs: + VERSION_NAME: ${{ steps.save_version.outputs.version_name }} + VERSION_NUMBER: ${{ steps.save_version.outputs.version_number }} + steps: + - uses: actions/checkout@v3 + - name: Decode .env + run: echo "${{ secrets.ENV }}" | base64 --decode > .env + - name: Read pubspec.yaml + uses: adore-me/read-yaml@v1.0.0 + id: read_pubspec + with: + file: './pubspec.yaml' + key-path: '["version"]' + - name: Save version on env variable + id: save_version + run: | + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "version_name=${split[0]}" >> $GITHUB_OUTPUT + echo "version_number=${split[1]}" >> $GITHUB_OUTPUT + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter clean + - run: flutter pub get + - run: flutter build macos --release + - name: Install the Apple certificate and sign the application + env: + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PWD: ${{ secrets.APPLE_CERTIFICATE_PWD }} + APPLE_KEYCHAIN_PWD: ${{ secrets.APPLE_KEYCHAIN_PWD }} + APPLE_IDENTITY_ID: ${{ secrets.APPLE_IDENTITY_ID }} + run: | + echo "$APPLE_CERTIFICATE" | base64 --decode > certificate.p12 + security create-keychain -p $APPLE_KEYCHAIN_PWD build.keychain + security default-keychain -s build.keychain + security unlock-keychain -p $APPLE_KEYCHAIN_PWD build.keychain + security import certificate.p12 -k build.keychain -P $APPLE_CERTIFICATE_PWD -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $APPLE_KEYCHAIN_PWD build.keychain + /usr/bin/codesign --force -s "$APPLE_IDENTITY_ID" $MACOS_APP_RELEASE_PATH/AdGuard\ Home\ Manager.app -v + - name: Create folder to build dmg + run: mkdir $MACOS_APP_RELEASE_PATH/AdGuard\ Home\ Manager + - name: Copy app into folder + run: cp -r $MACOS_APP_RELEASE_PATH/AdGuard\ Home\ Manager.app $MACOS_APP_RELEASE_PATH/AdGuard\ Home\ Manager/AdGuard\ Home\ Manager.app + - name: Generate symbolic link to Applications dir + run: ln -s /Applications $MACOS_APP_RELEASE_PATH/AdGuard\ Home\ Manager + - name: Generate dmg + run: hdiutil create -srcfolder $MACOS_APP_RELEASE_PATH/AdGuard\ Home\ Manager $MACOS_APP_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_macOS_Universal.dmg + - name: Copy dmg to project root + run: cp $MACOS_APP_RELEASE_PATH/AdGuardHomeManager_${{ env.VERSION_NAME }}_macOS_Universal.dmg AdGuardHomeManager_${{ env.VERSION_NAME }}_macOS_Universal.dmg + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: macos + path: AdGuardHomeManager_${{ env.VERSION_NAME }}_macOS_Universal.dmg + build-linux: + name: Build Linux .tar.gz and .deb + runs-on: ubuntu-latest + outputs: + VERSION_NAME: ${{ steps.save_version.outputs.version_name }} + VERSION_NUMBER: ${{ steps.save_version.outputs.version_number }} + steps: + - uses: actions/checkout@v3 + - name: Decode .env + run: echo "${{ secrets.ENV }}" | base64 --decode > .env + - name: Read pubspec.yaml + uses: adore-me/read-yaml@v1.0.0 + id: read_pubspec + with: + file: './pubspec.yaml' + key-path: '["version"]' + - name: Save version on env variable + id: save_version + run: | + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "version_name=${split[0]}" >> $GITHUB_OUTPUT + echo "version_number=${split[1]}" >> $GITHUB_OUTPUT + - name: Update version in debian.yaml + run: sed -i 's//${{ env.VERSION_NAME }}/g' debian/debian.yaml + - name: Update dependencies list + run: sudo apt-get update + - name: Install dependencies + run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter clean + - run: flutter pub get + - run: flutter build linux --release + - name: Install flutter_to_debian + run: dart pub global activate flutter_to_debian + - name: Generate .deb package + run: flutter_to_debian + - name: Move .deb package to project root + run: mv build/linux/x64/release/debian/AdGuardHomeManager_${{ env.VERSION_NAME }}_amd64.deb AdGuardHomeManager_${{ env.VERSION_NAME }}_Linux_amd64.deb + - name: Generate .tar.gz package + uses: a7ul/tar-action@v1.1.3 + id: compress + with: + command: c + cwd: build/linux/x64/release/bundle + files: | + ./data + ./lib + ./AdGuardHomeManager + outPath: AdGuardHomeManager_${{ env.VERSION_NAME }}_Linux.tar.gz + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: linux + path: | + AdGuardHomeManager_${{ env.VERSION_NAME }}_Linux_amd64.deb + AdGuardHomeManager_${{ env.VERSION_NAME }}_Linux.tar.gz + build-windows: + name: Build Windows installer + runs-on: windows-latest + outputs: + VERSION_NAME: ${{ steps.save_version.outputs.version_name }} + VERSION_NUMBER: ${{ steps.save_version.outputs.version_number }} + steps: + - uses: actions/checkout@v3 + - name: Decode .env + shell: pwsh + run: | + [IO.File]::WriteAllBytes('.env', [Convert]::FromBase64String('${{ secrets.ENV }}')) + - name: Read pubspec.yaml + uses: adore-me/read-yaml@v1.0.0 + id: read_pubspec + with: + file: './pubspec.yaml' + key-path: '["version"]' + - name: Save version on env variable + shell: bash + id: save_version + run: | + version=${{ steps.read_pubspec.outputs.data }} + IFS='+' + read -r -a split <<< "$version" + echo "VERSION_NAME=$(echo ${split[0]})" >> $GITHUB_ENV + echo "version_name=${split[0]}" >> $GITHUB_OUTPUT + echo "version_number=${split[1]}" >> $GITHUB_OUTPUT + - name: Update version in innosetup config file + shell: pwsh + run: | + (Get-Content windows/innosetup_installer_builder.iss) -replace '', '${{ env.VERSION_NAME }}' | Out-File -encoding ASCII windows/innosetup_installer_builder.iss + - uses: subosito/flutter-action@v2 + with: + channel: "stable" + - run: flutter clean + - run: flutter pub get + - run: flutter build windows --release + - name: Build installer witn innosetup + run: iscc /Q windows/innosetup_installer_builder.iss + - name: Move installer file to root directory + run: move build/windows/aghm_installer.exe AdGuardHomeManager_${{ env.VERSION_NAME }}_Windows_x64.exe + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: windows + path: AdGuardHomeManager_${{ env.VERSION_NAME }}_Windows_x64.exe + release-builds-github: + name: Release builds to GitHub + runs-on: ubuntu-latest + needs: [build-android, build-macos, build-linux, build-windows] + env: + VERSION_NAME: ${{ needs.build-android.outputs.VERSION_NAME }} + VERSION_NUMBER: ${{ needs.build-android.outputs.VERSION_NUMBER }} + steps: + - uses: actions/checkout@v3 + - name: Create builds directory + run: mkdir releases + - name: Download Android artifacts + uses: actions/download-artifact@v3 + with: + name: android + path: releases/ + - name: Download macOS artifacts + uses: actions/download-artifact@v3 + with: + name: macos + path: releases/ + - name: Download Linux artifacts + uses: actions/download-artifact@v3 + with: + name: linux + path: releases/ + - name: Download Windows artifacts + uses: actions/download-artifact@v3 + with: + name: windows + path: releases/ + - name: Release to GitHub + uses: ncipollo/release-action@v1 + with: + artifacts: "releases/*" + token: ${{ secrets.GH_TOKEN }} + tag: '${{ env.VERSION_NAME }}_(${{ env.VERSION_NUMBER }})' + name: v${{ env.VERSION_NAME }} + draft: true + prerelease: false + commit: ${{ github.sha }} + release-build-google-play: + name: Release Android build to the Google Play Store + runs-on: ubuntu-latest + needs: [build-android, build-macos, build-linux, build-windows] + env: + VERSION_NAME: ${{ needs.build-android.outputs.VERSION_NAME }} + steps: + - uses: actions/checkout@v3 + - name: Download Android artifacts + uses: actions/download-artifact@v3 + with: + name: android + - name: Release app to Google Play + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }} + packageName: com.jgeek00.adguard_home_manager + releaseFiles: AdGuardHomeManager_${{ env.VERSION_NAME }}_Android.aab + track: production + status: draft + releaseName: ${{ env.VERSION_NAME }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index e9d1504..6f4a17f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,11 +5,9 @@ *.swp .DS_Store .atom/ -.build/ .buildlog/ .history .svn/ -.swiftpm/ migrate_working_dir/ # Env @@ -50,6 +48,4 @@ app.*.map.json /debian/packages -untranslated.json - -android/app/.cxx +untranslated.json \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index fab9821..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "editor.formatOnSave": false, - "editor.formatOnPaste": false, - "editor.formatOnType": false, - "editor.defaultFormatter": "Dart-Code.flutter", - "dart.lineLength": 120, - "[dart]": { - "editor.rulers": [ - 120 - ], - "editor.defaultFormatter": "Dart-Code.dart-code", - "editor.formatOnSave": false, - "editor.formatOnPaste": false, - "editor.formatOnType": false - }, - "cSpell.ignorePaths": [ - "/pubspec.yaml", - "/.github/workflows" - ], -} \ No newline at end of file diff --git a/README.md b/README.md index 1dcbc67..930d090 100644 --- a/README.md +++ b/README.md @@ -40,16 +40,7 @@ Check the privacy policy [here](https://github.com/JGeek00/adguard-home-manager/ This is an unofficial application. The AdGuard Home team and the development of the AdGuard Home software is not related in any way with this application. ## Recommended configuration and lists -On [this repository](https://github.com/juanico10/Pihole_list) you can find a recommended configuration for AdGuard Home and some lists. Thanks to [juanico10](https://github.com/juanico10). - -## Donations -If you like the project and you want to contribute with the development, you can [become a sponsor on GitHub](https://github.com/sponsors/JGeek00), or you can donate using PayPal. - -
- - Donate with PayPal - -
+On [this repository](https://github.com/JuanRodenas/Pihole_list) you can find a recommended configuration for AdGuard Home and some lists. Thanks to [JuanRodenas](https://github.com/JuanRodenas). ## Generate production build