diff --git a/.github/workflows/release-beta.yaml b/.github/workflows/release-beta.yaml deleted file mode 100644 index 854ee28..0000000 --- a/.github/workflows/release-beta.yaml +++ /dev/null @@ -1,121 +0,0 @@ -name: Compile and release beta build - -on: - workflow_dispatch: - -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: JGeek00/read-yaml-files@2.0.0 - id: read_pubspec - with: - file: './pubspec.yaml' # File to read from - 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 deleted file mode 100644 index 0b0ae0c..0000000 --- a/.github/workflows/release-stable.yaml +++ /dev/null @@ -1,300 +0,0 @@ -name: Compile and release production build - -on: - workflow_dispatch: - -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: JGeek00/read-yaml-files@2.0.0 - id: read_pubspec - with: - file: './pubspec.yaml' # File to read from - 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: JGeek00/read-yaml-files@2.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: JGeek00/read-yaml-files@2.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: JGeek00/read-yaml-files@2.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/debian/debian.yaml b/debian/debian.yaml index 876c66e..046659c 100644 --- a/debian/debian.yaml +++ b/debian/debian.yaml @@ -5,7 +5,7 @@ flutter_app: control: Package: AdGuardHomeManager - Version: + Version: 2.20.0 Architecture: amd64 Essential: no Priority: optional diff --git a/pubspec.yaml b/pubspec.yaml index 02b1c09..489dfa0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.20.0-beta.1+146 +version: 2.20.0+147 environment: sdk: '>=2.18.1 <3.0.0'