Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/common-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
description: 'Git ref'
required: false
type: string
gradleOptions:
description: 'Gradle options'
required: false
type: string

jobs:
build:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/release-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down