Skip to content

Commit

Permalink
Push the apk build workflow to root
Browse files Browse the repository at this point in the history
  • Loading branch information
kitallis committed Mar 5, 2024
1 parent f5dd184 commit 258351b
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/mobile-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Manual build

on:
workflow_dispatch: # Enable manual run only

jobs:
build:
# This job will run on ubuntu virtual machine
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile
steps:
# Setup Java environment in order to build the Android app.
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'

# Setup the flutter environment.
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.13.4'

# Fetch sub modules
- run: git submodule update --init --recursive

# Get flutter dependencies.
- run: flutter pub get

- name: Setup keys
uses: timheuer/base64-to-file@v1
with:
fileName: 'keystore/ente_photos_key.jks'
encodedString: MIIKpgIBAzCCClAGCSqGSIb3DQEHAaCCCkEEggo9MIIKOTCCBbAGCSqGSIb3DQEHAaCCBaEEggWdMIIFmTCCBZUGCyqGSIb3DQEMCgECoIIFQDCCBTwwZgYJKoZIhvcNAQUNMFkwOAYJKoZIhvcNAQUMMCsEFBVjKtF6OgGgtasIbH+FWriBayLpAgInEAIBIDAMBggqhkiG9w0CCQUAMB0GCWCGSAFlAwQBKgQQqU2mQrSxRYGK/JxJdR3WMASCBNCm0ZoQSFSDkRL4nhuY6PCEb2hx+SKFOtCKkWbCn1rQSD09uXPFDcrG3AqoowgPvpzrmkNZdYQugg6BuBaoJvFTgr+AJRluHb+Q1Mi3XaNwheep0fS7IKU1Lus6ESs4c8mWvSLFX1vMaWdheMgJsLGnLTZAVZ2j9Fnpa5TVCvz3b1Pza8xyAFYcosHU91r0UiJJYalslA1FS/3FDEzSTr5PieXeu03XyWtnqD3Ml1sSUhJuXzPvfYvzNEwoy+fFMDOMz3HIjjMzfH49lSNh/vrgI/Bx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523y9M1r9qtVxd46OCRWJ/VFsXdo9jdkJhTKM+72A+GEV+wSyXJbru80pmrEZsp6yD7K6uKNG8xVu6mr1tZflL7EiB+ygA1mhKwcbe2R/jXPrAB/6L8esHU7oem+DQO2QS4BWJ3pRJInCC6+7mYJs6MtmfhW6wcOFkRkinblINDNaphSbHg7/d+/8263SCuoIQIMj6S2vZwPkn9es1I1nWVyJ3PRzi2oqBCRda0c1EspNkd+T3ITFrECX/xIQrgzpv9aeST0+BzcAt4WlikYM6710b87cW9fOajgMeT5W2BMt3Q1oIDf9wiXyOV4SqwGoGug/fH6l8yBpwoxHDFjwXGGlPe2aU0Obbo65m0PNiQh36gE8jjIZOui37RtIs0e8wDVEVNLdXXAX01qE2pWD6ieYliGWhfdCkgrblDRyna3scto6RREbRt2NpyieYfzOdKUjBDa/SUjPSGHdMwOR4DiSUTeP/nJWNonR0csteIb66W/X+lew2LyOYDywpvMmPBZCm/NmQ39yd+FTNEosiyJwWQ/+Nv1qhkMzffK19YhRMtt8QtKwxzLPywxi0i7aPu2YySghRyMV5Tw/5OxnBCqI2Q/08vc/vyOT/P1oyLwgDCIa/JoN3Tf+hm85s1I6ztxOAMWCUjJF9LVyUtOKOWoP2gafntTnwPjqPImYmSjgzkALz6neNXtciCNGLShEogrjbcZB9S2mi2Nmy2qjvHm585fuFe/q4AmnFkrNuHmla1cVRyW68tyHjIxpPSsc/u5YJMw2ZXYYuZeHRJ+dR/JGTbBlRRVH9+qLxHKG50y3VQ2vARxoCKnL8AwTTAxMA0GCWCGSAFlAwQCAQUABCBeGdbBEU4IZKRwIgNQbLYi5wbJknLSS/77gm7dUVXdOgQUhfLHoI7aRE/MmEO3hMinOXQpZ+gCAicQ

# Build independent apk.
- name: Build
run: flutter build apk --release --flavor independent && mv build/app/outputs/flutter-apk/app-independent-release.apk build/app/outputs/flutter-apk/ente.apk
env:
SIGNING_KEY_PATH: '/home/runner/work/_temp/keystore/ente_photos_key.jks'
SIGNING_KEY_ALIAS: entekey
SIGNING_KEY_PASSWORD: foobar
SIGNING_STORE_PASSWORD: ALpZoF9cblvbikN

- name: Checksum
run: sha256sum build/app/outputs/flutter-apk/ente.apk > build/app/outputs/flutter-apk/sha256sum

# Upload generated apk to the artifacts.
- uses: actions/upload-artifact@v4
with:
name: release-apk
path: build/app/outputs/flutter-apk/ente.apk

- uses: actions/upload-artifact@v4
with:
name: release-checksum
path: build/app/outputs/flutter-apk/sha256sum

# Create a pre-release
# - uses: ncipollo/[email protected]
# with:
# artifacts: "build/app/outputs/flutter-apk/ente.apk,build/app/outputs/flutter-apk/sha256sum"
# token: ${{ secrets.GITHUB_TOKEN }}
# prerelease: true

0 comments on commit 258351b

Please sign in to comment.