diff --git a/.github/workflows/build-deploy.yaml b/.github/workflows/build-deploy.yaml index 4cc267e..4da83e5 100644 --- a/.github/workflows/build-deploy.yaml +++ b/.github/workflows/build-deploy.yaml @@ -7,7 +7,7 @@ on: branches: [ "main" ] jobs: - build-windows: + build_windows: runs-on: windows-latest environment: prod steps: @@ -35,7 +35,7 @@ jobs: name: windows-build path: build/windows/x64/runner/Release/ - build-android: + build_android: runs-on: ubuntu-latest environment: prod steps: @@ -98,7 +98,7 @@ jobs: dart run build_runner build --delete-conflicting-outputs - name: Build iOS - run: flutter build ios --release + run: flutter build ios --release --no-codesign - name: Upload iOS artifact uses: actions/upload-artifact@v4 @@ -119,7 +119,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update -y - sudo apt-get install -y ninja-build libgtk-3-dev + sudo apt-get install -y ninja-build libgtk-3-dev libmpv-dev mpv - name: Install dependencies run: flutter pub get @@ -130,7 +130,7 @@ jobs: dart run build_runner build --delete-conflicting-outputs - name: Build Linux - run: flutter build linux + run: flutter build linux --release - name: Upload Linux artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index e28c95b..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,255 +0,0 @@ -name: Create Release on Tag - -on: - push: - tags: - - 'v*' - -jobs: - build-windows: - runs-on: windows-latest - environment: prod - steps: - - uses: actions/checkout@v3 - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - - - name: Install dependencies - run: flutter pub get - - - name: Set up environment variables - run: | - echo "API_KEY=${{ secrets.API_KEY }}" > .env - - - name: Build Windows - run: make build_windows - - - name: Upload Windows artifact - uses: actions/upload-artifact@v4 - with: - name: windows-build - path: build/windows/x64/runner/Release/ - - build-android: - runs-on: ubuntu-latest - environment: prod - steps: - - uses: actions/checkout@v3 - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '11' - - - name: Install dependencies - run: flutter pub get - - - name: Set up environment variables - run: | - echo "API_KEY=${{ secrets.API_KEY }}" > .env - - - name: Create key.properties file - run: | - echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties - echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties - echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties - echo "storeFile=key.jks" >> android/key.properties - - - name: Decode and save keystore file - run: | - echo "${{ secrets.STORE_FILE_BASE64 }}" | base64 --decode > android/app/key.jks - - - name: Build Android - run: make build_android - - - name: Upload Android artifact - uses: actions/upload-artifact@v4 - with: - name: android-build - path: build/app/outputs/flutter-apk/app-release.apk - - build_ipa: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - - - name: Install dependencies - run: flutter pub get - - - name: Set up environment variables - run: | - echo "API_KEY=${{ secrets.API_KEY }}" > .env - - - name: Build iOS - run: flutter build ios --release - - - name: Upload iOS artifact - uses: actions/upload-artifact@v4 - with: - name: ios-build - path: build/ios/iphoneos/Runner.app - - build_linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - - - name: Install dependencies - run: | - sudo apt-get update -y - sudo apt-get install -y ninja-build libgtk-3-dev - - - name: Install dependencies - run: flutter pub get - - - name: Set up environment variables - run: | - echo "API_KEY=${{ secrets.API_KEY }}" > .env - - - name: Build Linux - run: flutter build linux - - - name: Upload Linux artifact - uses: actions/upload-artifact@v4 - with: - name: linux-build - path: build/linux/x64/release/bundle - - build_macos: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - - - name: Install dependencies - run: flutter pub get - - - name: Set up environment variables - run: | - echo "API_KEY=${{ secrets.API_KEY }}" > .env - - - name: Build MacOS - run: flutter build macos - - - name: Upload MacOS artifact - uses: actions/upload-artifact@v4 - with: - name: macos-build - path: build/macos/Build/Products/Release/Madari.app - - create-release: - runs-on: ubuntu-latest - needs: [build-windows, build-android, build_ipa, build_linux, build_macos] - steps: - - name: Download Windows artifact - uses: actions/download-artifact@v4 - with: - name: windows-build - path: artifacts/windows - - - name: Download Android artifact - uses: actions/download-artifact@v4 - with: - name: android-build - path: artifacts/android - - - name: Download iOS artifact - uses: actions/download-artifact@v4 - with: - name: ios-build - path: artifacts/ios - - - name: Download Linux artifact - uses: actions/download-artifact@v4 - with: - name: linux-build - path: artifacts/linux - - - name: Download MacOS artifact - uses: actions/download-artifact@v4 - with: - name: macos-build - path: artifacts/macos - - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - - name: Upload Windows artifact to Release - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/windows/your-windows-build-file.exe - asset_name: your-windows-build-file.exe - asset_content_type: application/octet-stream - - - name: Upload Android artifact to Release - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/android/app-release.apk - asset_name: app-release.apk - asset_content_type: application/vnd.android.package-archive - - - name: Upload iOS artifact to Release - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/ios/Runner.app - asset_name: Runner.app - asset_content_type: application/octet-stream - - - name: Upload Linux artifact to Release - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/linux/your-linux-build-file - asset_name: your-linux-build-file - asset_content_type: application/octet-stream - - - name: Upload MacOS artifact to Release - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: artifacts/macos/Madari.app - asset_name: Madari.app - asset_content_type: application/octet-stream