name: Publish on: push: branches: - main concurrency: group: publish cancel-in-progress: true jobs: setup: name: Setup runs-on: ubuntu-22.04 outputs: flutter_version: ${{ steps.flutter_version.outputs.FLUTTER_VERSION }} build_number: ${{ steps.build_number.outputs.BUILD_NUMBER }} steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Set build number id: build_number run: echo "BUILD_NUMBER=$(date +"%s")" >> $GITHUB_OUTPUT android: name: Android runs-on: ubuntu-22.04 needs: setup steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - uses: kuhnroyal/flutter-fvm-config-action@6ffa30473b346f7d7c63cf9e03e6a886f940a72b # v1 id: fvm_config - uses: subosito/flutter-action@cc97e1648fff6ca5cc647fa67f47e70f7895510b # v2 with: flutter-version: ${{ steps.fvm_config.outputs.FLUTTER_VERSION }} channel: ${{ steps.fvm_config.outputs.FLUTTER_CHANNEL }} - name: Set up JDK 11 uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3 with: distribution: 'adopt' java-version: 11 - name: Build run: cd packages/app && flutter build apk --split-per-abi --build-number="${{ needs.setup.outputs.build_number }}" - uses: ilharp/sign-android-release@2034987c31e3959f7c97e88d5e656e52e6e88bd8 # v1 name: Sign with: releaseDir: packages/app/build/app/outputs/flutter-apk signingKey: ${{ secrets.SIGNING_KEY }} keyAlias: ${{ secrets.ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 with: name: Android arm64-v8a path: packages/app/build/app/outputs/flutter-apk/app-arm64-v8a-release-signed.apk if-no-files-found: error - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 with: name: Android armeabi-v7a path: packages/app/build/app/outputs/flutter-apk/app-armeabi-v7a-release-signed.apk if-no-files-found: error - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 with: name: Android x86_64 path: packages/app/build/app/outputs/flutter-apk/app-x86_64-release-signed.apk if-no-files-found: error - name: F-Droid nightly run: | cp packages/app/build/app/outputs/flutter-apk/app-arm64-v8a-release.apk app-arm64-v8a-debug.apk cp packages/app/build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk app-armeabi-v7a-debug.apk cp packages/app/build/app/outputs/flutter-apk/app-x86_64-release.apk app-x86_64-debug.apk sudo add-apt-repository ppa:fdroid/fdroidserver sudo apt-get update sudo apt-get install apksigner fdroidserver python3-pip --no-install-recommends sudo apt-get purge fdroidserver pip3 install https://gitlab.com/fdroid/fdroidserver/-/archive/master/fdroidserver.tar.gz export DEBUG_KEYSTORE=${{ secrets.DEBUG_KEYSTORE }} GITHUB_REPOSITORY=provokateurin/nextcloud-neon fdroid nightly -v --archive-older 10 linux: name: Linux ${{ matrix.architecture.flutter }} runs-on: ubuntu-22.04 needs: setup permissions: packages: write strategy: matrix: architecture: - docker: amd64 flutter: x64 - docker: arm64 flutter: arm64 steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Login to GHCR uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3 with: platforms: ${{ matrix.architecture.docker }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3 with: platforms: linux/${{ matrix.architecture.docker }} - name: Install dart uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1 - name: Setup run: ./tool/setup.sh - name: Build run: ./tool/build-app.sh linux/${{ matrix.architecture.docker }} --build-number="${{ needs.setup.outputs.build_number }}" - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3 with: name: Linux ${{ matrix.architecture.flutter }} path: packages/app/build/linux/${{ matrix.architecture.flutter }}/release/bundle/* if-no-files-found: error