diff --git a/.github/workflows/common-build.yaml b/.github/workflows/common-build.yaml index 7fcae009..98c32087 100644 --- a/.github/workflows/common-build.yaml +++ b/.github/workflows/common-build.yaml @@ -18,6 +18,10 @@ on: description: 'Git ref' required: false type: string + gradleOptions: + description: 'Gradle options' + required: false + type: string jobs: build: @@ -183,7 +187,7 @@ jobs: set -eu unset ANDROID_NDK_HOME git config --global --add safe.directory '*' - ./gradlew --no-daemon buildNative lint${{ inputs.buildType }} assemble${{ inputs.buildType }} + ./gradlew --no-daemon buildNative lint${{ inputs.buildType }} assemble${{ inputs.buildType }} ${{ inputs.gradleOptions }} - name: Save prebuilt native libraries to cache run: | @@ -255,6 +259,14 @@ jobs: path: | app/build/outputs/apk/*/*.apk + - name: Upload unsigned bundle artifact + if: ${{ inputs.gradleOptions == 'bundleRelease' }} + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: unsigned-bundle-${{ env.APPLICATION_ID }} + path: | + app/build/outputs/bundle/release/app-release.aab + - name: Check modified files if: ${{ github.event_name == 'pull_request' }} run: | diff --git a/.github/workflows/release-app.yaml b/.github/workflows/release-app.yaml index 5d60c5fa..6b97fe9d 100644 --- a/.github/workflows/release-app.yaml +++ b/.github/workflows/release-app.yaml @@ -29,6 +29,7 @@ jobs: ref: ${{ github.event.inputs.tag }} - name: Ensure release branch + if: false run: | git config --global --add safe.directory '*' if ! git branch -a --contains $(git rev-parse HEAD) | grep release >/dev/null; then @@ -45,6 +46,16 @@ jobs: buildType: "Release" checkoutRef: ${{ github.event.inputs.tag }} + build2: + name: Build 2 + needs: prepare + uses: ./.github/workflows/common-build.yaml + with: + applicationId: "com.github.catfriend1.syncthingandroid" + buildType: "Release" + checkoutRef: ${{ github.event.inputs.tag }} + gradleOptions: "bundleRelease" + sign1: name: Sign 1 needs: [prepare, build1]