Compare commits

..

1 Commits

Author SHA1 Message Date
Neeraj Gupta
6146350aae [docs] Update custom server section for cli 2024-03-13 12:02:36 +05:30
5799 changed files with 517735 additions and 457008 deletions

View File

@@ -1,17 +1,24 @@
name: Report a bug
description: Things that were working earlier but don't anymore
labels: []
description: Let us know if something's not working the way you expected.
labels: ["triage"]
body:
- type: markdown
attributes:
value: |
**Checklist**
1. You've searched existing [issues](https://github.com/search?q=repo%3Aente-io%2Fente+&type=issues) and [discussions](https://github.com/search?q=repo%3Aente-io%2Fente+&type=discussions)
2. It was working earlier (otherwise use [enhancements](https://github.com/ente-io/ente/discussions/categories/enhancements))
3. It is not about self hosting (for those use [this](https://github.com/ente-io/ente/discussions/categories/q-a))
value: >
Before opening a new issue, please ensure you are on the latest
version (it might've already been fixed), and that you've searched
for existing issues (please add you observations as a comment
there instead of creating a duplicate).
- type: textarea
attributes:
label: Description
description: >
Please describe the bug. If possible, also include the steps to
reproduce the behaviour, and the expected behaviour (sometimes
bugs are just expectation mismatches, in which case this would be
a good fit for Discussions).
validations:
required: true
- type: input
attributes:
label: Version

View File

@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Enhacements, feature requests, feedback and questions
- name: Feature requests and questions
url: https://github.com/ente-io/ente/discussions
about: Please use Discussions for everything apart from the above.

BIN
.github/assets/github-badge.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,35 +0,0 @@
name: "Push sources to Crowdin (auth)"
on:
push:
branches: [main]
paths:
# Run workflow when auth's intl_en.arb is changed
- "mobile/apps/auth/lib/l10n/arb/app_en.arb"
# Or the workflow itself is changed
- ".github/workflows/auth-crowdin.yml"
permissions:
contents: write
pull-requests: write
jobs:
push-sources-to-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v2
with:
base_path: "mobile/apps/auth/"
config: "mobile/apps/auth/crowdin.yml"
upload_sources: true
upload_translations: false
download_translations: false
project_id: 575169
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -1,40 +0,0 @@
name: "Sync Crowdin translations (auth)"
on:
schedule:
# Run Mondays at ~6:30 AM IST
# See: [Note: Run workflow on specific days of the week]
- cron: "50 0 * * 1"
# Also allow manually running the workflow.
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v2
with:
base_path: "mobile/apps/auth/"
config: "mobile/apps/auth/crowdin.yml"
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: translations/auth
create_pull_request: true
skip_untranslated_strings: true
pull_request_title: "[auth] New translations"
pull_request_body: "New translations from [Crowdin](https://crowdin.com/project/ente-authenticator-app)"
pull_request_base_branch_name: "main"
project_id: 575169
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

42
.github/workflows/auth-crowdin.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: "Sync Crowdin translations (auth)"
on:
push:
paths:
# Run workflow when auth's intl_en.arb is changed
- "mobile/lib/l10n/arb/app_en.arb"
# Or the workflow itself is changed
- ".github/workflows/auth-crowdin.yml"
branches: [main]
schedule:
# See: [Note: Run every 24 hours]
- cron: "50 1 * * *"
# Also allow manually running the workflow
workflow_dispatch:
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v1
with:
base_path: "auth/"
config: "auth/crowdin.yml"
upload_sources: true
upload_translations: true
download_translations: true
localization_branch_name: crowdin-translations-auth
create_pull_request: true
skip_untranslated_strings: true
pull_request_title: "[auth] New translations"
pull_request_body: "New translations from [Crowdin](https://crowdin.com/project/ente-authenticator-app)"
pull_request_base_branch_name: "main"
project_id: 575169
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -1,68 +0,0 @@
name: "Internal release (auth mobile)"
on:
workflow_dispatch: # Allow manually running the action
env:
FLUTTER_VERSION: "3.32.8"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile/apps/auth
steps:
- name: Checkout code and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Setup keys
uses: timheuer/base64-to-file@v1
with:
fileName: "keystore/ente_auth_key.jks"
encodedString: ${{ secrets.SIGNING_KEY }}
- name: Build PlayStore AAB
run: |
flutter build appbundle --dart-define=cronetHttpNoPlay=true --release --flavor playstore
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_auth_key.jks"
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Upload AAB to PlayStore
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: io.ente.auth
releaseFiles: mobile/apps/auth/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
track: internal
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}
nodetail: true
title: "🏆 Internal release available for Auth"
description: "[Download](https://play.google.com/store/apps/details?id=io.ente.auth)"
color: 0x800080

View File

@@ -1,54 +1,28 @@
name: "Lint (auth)"
on:
# Run on every pull request (open or push to it) that changes auth/
pull_request:
# Run on every push to a branch other than main that changes auth/
push:
branches-ignore: [main]
paths:
- "mobile/apps/auth/**"
- "auth/**"
- ".github/workflows/auth-lint.yml"
env:
FLUTTER_VERSION: "3.32.8"
permissions:
contents: read
FLUTTER_VERSION: "3.16.9"
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile/apps/auth
working-directory: auth
steps:
- name: Checkout code and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Verify custom icons are lowercase including optional understores, and end with .svg
run: |
find assets/custom-icons -type f -name "*.svg" | while read -r file; do
if [[ "$(basename "$file")" != "$(basename "$file" | tr '[:upper:]' '[:lower:]' | tr ' ' '_')" ]]; then
echo "File name is not lowercase: $file"
exit 1
fi
done
- name: Verify all icons are less than 20KB
run: |
find assets/custom-icons -type f -name "*.svg" | while read -r file; do
if [[ "$file" == "assets/custom-icons/icons/bbs_nga.svg" ]]; then
continue
fi
if [[ "$(stat --printf="%s" "$file")" -gt 20480 ]]; then
echo "File size is greater than 20KB: $file ($file_size bytes)"
exit 1
fi
done
- name: Verify custom icon JSON
run: cat assets/custom-icons/_data/custom-icons.json | jq empty
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
@@ -59,3 +33,6 @@ jobs:
- run: flutter pub get
- run: flutter analyze --no-fatal-infos
- name: Verify custom icon JSON
run: cat assets/custom-icons/_data/custom-icons.json | jq empty

View File

@@ -17,8 +17,8 @@ name: "Release (auth)"
# We use a suffix like `-test` to indicate that these are test tags, and that
# they belong to a pre-release.
#
# If you need to do multiple tests, add a .x at the end of the tag. e.g.
# `auth-v1.2.3-test.1`.
# If you need to do multiple tests, add a +x at the end of the tag. e.g.
# `auth-v1.2.3-test+1`.
#
# Once the testing is done, also delete the tag(s) please.
@@ -29,18 +29,15 @@ on:
- "auth-v*"
env:
FLUTTER_VERSION: "3.32.8"
permissions:
contents: write
FLUTTER_VERSION: "3.13.4"
jobs:
build-linux-latest:
runs-on: ubuntu-22.04
build-ubuntu:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile/apps/auth
working-directory: auth
steps:
- name: Checkout code and submodules
@@ -48,11 +45,6 @@ jobs:
with:
submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
@@ -71,7 +63,7 @@ jobs:
- name: Build independent APK
run: |
flutter build apk --dart-define=cronetHttpNoPlay=true --release --flavor independent
flutter build apk --release --flavor independent --dart-define=app.flavor=independent
mv build/app/outputs/flutter-apk/app-independent-release.apk artifacts/ente-${{ github.ref_name }}.apk
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_auth_key.jks"
@@ -80,10 +72,8 @@ jobs:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Build PlayStore AAB
# disable this step if release tag contains nightly or beta
if: startsWith(github.ref, 'refs/tags/auth-v') && !contains(github.ref, 'nightly') && !contains(github.ref, 'beta')
run: |
flutter build appbundle --release --flavor playstore --dart-define=app.flavor=playstore --dart-define=cronetHttpNoPlay=true
flutter build appbundle --release --flavor playstore --dart-define=app.flavor=playstore
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_auth_key.jks"
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
@@ -93,59 +83,54 @@ jobs:
- name: Install dependencies for desktop build
run: |
sudo apt-get update -y
sudo apt-get install -y libsecret-1-dev libsodium-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm patchelf libsqlite3-dev locate libayatana-appindicator3-dev libffi-dev libtiff5 xz-utils libarchive-tools libcurl4-openssl-dev
sudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu'
sudo apt-get install -y libsecret-1-dev libsodium-dev libwebkit2gtk-4.0-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm libsqlite3-dev locate
- name: Install appimagetool
run: |
wget -O appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool
mv appimagetool /usr/local/bin/
- name: Build desktop app
# Temporarily disable desktop builds
if: false
run: |
flutter config --enable-linux-desktop
dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor
# RPM
flutter_distributor package --platform=linux --targets=rpm --skip-clean
mv dist/**/*-*-linux.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm
# APPIMAGE
flutter_distributor package --platform=linux --targets=appimage --skip-clean
mv dist/**/*-*-linux.AppImage artifacts/ente-${{ github.ref_name }}-x86_64.AppImage
# DEB
dart pub global activate flutter_distributor
flutter_distributor package --platform=linux --targets=deb --skip-clean
flutter_distributor package --platform=linux --targets=rpm --skip-clean
flutter_distributor package --platform=linux --targets=appimage --skip-clean
mv dist/**/*-*-linux.deb artifacts/ente-${{ github.ref_name }}-x86_64.deb
mv dist/**/*-*-linux.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm
mv dist/**/*-*-linux.AppImage artifacts/ente-${{ github.ref_name }}-x86_64.AppImage
env:
LIBSODIUM_USE_PKGCONFIG: 1
- name: Generate checksums
run: |
sha256sum artifacts/ente-auth-*.apk >> artifacts/sha256sum-apk
sha256sum artifacts/ente-auth-*.deb artifacts/ente-auth-*.rpm artifacts/ente-auth-*.AppImage >> artifacts/sha256sum-linux
run: sha256sum artifacts/ente-* > artifacts/sha256sum
- name: Create a draft GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "mobile/apps/auth/artifacts/*"
artifacts: "auth/artifacts/*"
draft: true
allowUpdates: true
updateOnlyUnreleased: true
- name: Upload AAB to PlayStore
# disable this step if release tag contains nightly or beta
if: startsWith(github.ref, 'refs/tags/auth-v') && !contains(github.ref, 'nightly') && !contains(github.ref, 'beta')
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: io.ente.auth
releaseFiles: mobile/apps/auth/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
releaseFiles: auth/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
track: internal
build-windows:
runs-on: windows-latest
environment: "auth-win-build"
defaults:
run:
working-directory: mobile/apps/auth
working-directory: auth
steps:
- name: Checkout code and submodules
@@ -164,44 +149,40 @@ jobs:
run: mkdir artifacts
- name: Build Windows installer
# Temporarily disable desktop builds
if: false
run: |
flutter config --enable-windows-desktop
# dart pub global activate flutter_distributor
dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor
dart pub global activate flutter_distributor
make innoinstall
flutter_distributor package --platform=windows --targets=exe --skip-clean
mv dist/**/*-windows-setup.exe artifacts/ente-${{ github.ref_name }}-installer.exe
mv dist/**/ente_auth-*-windows-setup.exe artifacts/ente-${{ github.ref_name }}-installer.exe
- name: Retain Windows EXE and DLLs
# Temporarily disable desktop builds
if: false
run: cp -r build/windows/x64/runner/Release ente-${{ github.ref_name }}-windows
- name: Sign files with Trusted Signing
uses: azure/trusted-signing-action@v0
- name: Code sign Windows installer and EXE
# Temporarily disable desktop builds
if: false
uses: dlemstra/code-sign-action@v1
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.AZURE_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
files: |
${{ github.workspace }}/mobile/apps/auth/artifacts/ente-${{ github.ref_name }}-installer.exe
${{ github.workspace }}/mobile/apps/auth/ente-${{ github.ref_name }}-windows/auth.exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
certificate: "${{ secrets.WINDOWS_CERTIFICATE }}"
password: "${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}"
files: |
auth/artifacts/ente-${{ github.ref_name }}-installer.exe
auth/ente-${{ github.ref_name }}-windows/auth.exe
- name: Zip Windows EXE and DLLs
run: tar.exe -a -c -f artifacts/ente-${{ github.ref_name }}-windows.zip ente-${{ github.ref_name }}-windows
- name: Generate checksums
run: sha256sum artifacts/ente-* > artifacts/sha256sum-windows
# Temporarily disable desktop builds
if: false
run: tar.exe -a -c -f auth/artifacts/ente-${{ github.ref_name }}-windows.zip auth/ente-${{ github.ref_name }}-windows
- name: Create a draft GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "mobile/apps/auth/artifacts/*"
artifacts: "auth/artifacts/*"
draft: true
allowUpdates: true
updateOnlyUnreleased: true
@@ -211,7 +192,7 @@ jobs:
defaults:
run:
working-directory: mobile/apps/auth
working-directory: auth
steps:
- name: Checkout code and submodules
@@ -267,19 +248,25 @@ jobs:
run: mkdir artifacts
- name: Build macOS DMG
# Temporarily disable desktop builds
if: false
run: |
flutter config --enable-macos-desktop
dart pub global activate flutter_distributor
flutter_distributor package --platform=macos --targets=dmg --skip-clean
mv dist/**/*-macos.dmg artifacts/ente-${{ github.ref_name }}.dmg
mv dist/**/ente_auth-*-macos.dmg artifacts/ente-${{ github.ref_name }}.dmg
- name: Code sign DMG
# Temporarily disable desktop builds
if: false
run: |
CERT_NAME=$(security find-identity -v -p codesigning | grep "Developer ID Application" | awk -F'"' '{print $2}' | grep -m1 "")
codesign --force --timestamp --sign "$CERT_NAME" --options runtime artifacts/ente-${{ github.ref_name }}.dmg
codesign --verify --verbose=4 artifacts/ente-${{ github.ref_name }}.dmg
- name: Notarize and staple DMG
# Temporarily disable desktop builds
if: false
run: |
xcrun notarytool submit artifacts/ente-${{ github.ref_name }}.dmg \
--wait \
@@ -292,13 +279,10 @@ jobs:
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Generate checksums
run: shasum -a 256 artifacts/ente-* > artifacts/sha256sum-macos
- name: Create a draft GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "mobile/apps/auth/artifacts/*"
artifacts: "auth/artifacts/*"
draft: true
allowUpdates: true
updateOnlyUnreleased: true

View File

@@ -12,10 +12,6 @@ on:
tags:
- "cli-v*"
permissions:
contents: write
packages: write
jobs:
draft-release:
runs-on: ubuntu-latest
@@ -49,7 +45,7 @@ jobs:
goarch: ${{ matrix.goarch }}
asset_name: ente-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}
release_name: ${{ github.ref_name }}
goversion: "1.23"
goversion: "1.20"
project_path: "./cli"
pre_command: export CGO_ENABLED=0
build_flags: "-trimpath"

View File

@@ -1,53 +0,0 @@
# The only reason we're making a custom CodeQL configuration is because the
# default setup does not have an option to run daily / weekly instead of per
# push, which is too slow.
#
# In the future, it might become faster. Then just delete this file, and revert
# to the default configuration.
#
# References:
# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/
name: "CodeQL"
on:
workflow_dispatch: # Allow running manually
schedule:
- cron: "22 1 * * 1"
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: 'ubuntu-latest'
permissions:
contents: read
# Required for all workflows.
security-events: write
# Required to fetch internal or private CodeQL packs.
packages: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: go
build-mode: autobuild
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -1,27 +0,0 @@
name: "Release (copycat-db)"
on:
workflow_dispatch: # Run manually
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & Push
with:
dockerfile: infra/copycat-db/Dockerfile
directory: infra/copycat-db
image: ente/copycat-db
registry: rg.fr-par.scw.cloud
enableBuildKit: true
buildArgs: GIT_COMMIT=${GITHUB_SHA}
tags: ${GITHUB_SHA}, latest
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -1,32 +0,0 @@
name: "Lint (desktop)"
on:
# Run on every pull request (open or push to it) that changes desktop/
pull_request:
paths:
- "desktop/**"
- ".github/workflows/desktop-lint.yml"
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: desktop
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "desktop/yarn.lock"
- run: yarn install
- run: yarn lint

View File

@@ -10,9 +10,6 @@ on:
# Also allow manually running the workflow
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
@@ -28,7 +25,7 @@ jobs:
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
@@ -40,8 +37,11 @@ jobs:
run: yarn build
- name: Publish
uses: cloudflare/wrangler-action@v3
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=help docs/docs/.vitepress/dist
projectName: ente
branch: help
directory: docs/docs/.vitepress/dist
wranglerVersion: "3"

View File

@@ -1,32 +0,0 @@
name: "Lint (docs)"
on:
# Run on every pull request (open or push to it) that changes docs/
pull_request:
paths:
- "docs/**"
- ".github/workflows/docs-lint.yml"
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- run: yarn install
- run: yarn pretty:check

View File

@@ -4,15 +4,13 @@ name: "Verify build (docs)"
# succeeding before we merge the PR into main.
on:
# Run on every pull request (open or push to it) that changes docs/
pull_request:
# Run on every push to a branch other than main that changes docs/
push:
branches-ignore: [main]
paths:
- "docs/**"
- ".github/workflows/docs-verify-build.yml"
permissions:
contents: read
jobs:
verify-build:
runs-on: ubuntu-latest
@@ -28,7 +26,7 @@ jobs:
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"

View File

@@ -1,46 +0,0 @@
name: "Deploy (staff)"
on:
# Run on every push to main that changes infra/staff/
push:
branches: [main]
paths:
- "infra/staff/**"
- ".github/workflows/infra-deploy-staff.yml"
# Also allow manually running the workflow
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: infra/staff
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "infra/staff/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Publish
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/staff infra/staff/dist

View File

@@ -1,36 +0,0 @@
name: "Lint (staff)"
on:
# Run on every pull request (open or push to it) that changes infra/staff/
pull_request:
paths:
- "infra/staff/**"
- ".github/workflows/infra-deploy-staff.yml"
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: infra/staff
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "infra/staff/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Lint
run: yarn lint

View File

@@ -1,35 +0,0 @@
name: "Push sources to Crowdin (mobile)"
on:
push:
branches: [main]
paths:
# Run workflow when mobiles's intl_en.arb is changed
- "mobile/apps/photos/lib/l10n/intl_en.arb"
# Or the workflow itself is changed
- ".github/workflows/mobile-crowdin.yml"
permissions:
contents: write
pull-requests: write
jobs:
push-sources-to-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v2
with:
base_path: "mobile/apps/photos/"
config: "mobile/apps/photos/crowdin.yml"
upload_sources: true
upload_translations: false
download_translations: false
project_id: 574741
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -1,39 +0,0 @@
name: "Sync Crowdin translations (mobile/photos)"
on:
schedule:
# Run Mondays at ~6:30 AM IST
# See: [Note: Run workflow on specific days of the week]
- cron: "40 0 * * 1"
# Also allow manually running the workflow.
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v2
with:
base_path: "mobile/apps/photos/"
config: "mobile/apps/photos/crowdin.yml"
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: translations/mobile
create_pull_request: true
pull_request_title: "[mobile/photos] New translations"
pull_request_body: "New translations from [Crowdin](https://crowdin.com/project/ente-photos-app)"
pull_request_base_branch_name: "main"
project_id: 574741
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

42
.github/workflows/mobile-crowdin.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: "Sync Crowdin translations (mobile)"
on:
push:
paths:
# Run workflow when mobiles's intl_en.arb is changed
- "mobile/lib/l10n/intl_en.arb"
# Or the workflow itself is changed
- ".github/workflows/mobile-crowdin.yml"
branches: [main]
schedule:
# See: [Note: Run every 24 hours]
- cron: "40 1 * * *"
# Also allow manually running the workflow
workflow_dispatch:
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v1
with:
base_path: "mobile/"
config: "mobile/crowdin.yml"
upload_sources: true
upload_translations: true
download_translations: true
localization_branch_name: crowdin-translations-mobile
create_pull_request: true
skip_untranslated_strings: true
pull_request_title: "[mobile] New translations"
pull_request_body: "New translations from [Crowdin](https://crowdin.com/project/ente-photos-app)"
pull_request_base_branch_name: "main"
project_id: 574741
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -1,140 +0,0 @@
name: "Internal release (photos)"
on:
schedule:
# Runs daily at 12:30 UTC (6:00 PM IST)
- cron: "30 12 * * *"
workflow_dispatch: # Allow manual trigger
env:
FLUTTER_VERSION: "3.32.8"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile/apps/photos
steps:
- name: Checkout code and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Increment version code for build
run: |
CURRENT_VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //')
VERSION_NAME=$(echo $CURRENT_VERSION | cut -d'+' -f1)
CURRENT_BUILD=$(echo $CURRENT_VERSION | cut -d'+' -f2)
NEW_BUILD=$((CURRENT_BUILD + ${{ github.run_number }}))
NEW_VERSION="${VERSION_NAME}+${NEW_BUILD}"
sed -i "s/^version: .*/version: $NEW_VERSION/" pubspec.yaml
echo "Building with version ${NEW_VERSION}"
# Store version for later use
echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV
- name: Prepare and validate changelog for Play Store
run: |
mkdir -p whatsnew
CHANGELOG_FILE="scripts/store_changes.txt"
DISCORD_FILE="scripts/internal_changes.txt"
OUTPUT_FILE="whatsnew/whatsnew-en-US"
# Use provided changelog or fallback
if [ -f "$CHANGELOG_FILE" ]; then
head -c 500 "$CHANGELOG_FILE" > "$OUTPUT_FILE"
else
echo "Bug fixes and improvements" > "$OUTPUT_FILE"
fi
# Validate: file exists
if [ ! -s "$OUTPUT_FILE" ]; then
echo "❌ Changelog is empty."
exit 1
fi
# Validate: <= 500 chars
LENGTH=$(wc -m < "$OUTPUT_FILE")
if [ "$LENGTH" -gt 500 ]; then
echo "❌ Changelog exceeds 500 characters ($LENGTH)."
exit 1
fi
# Validate: no markdown or HTML
if grep -Eq '[\*\_\<\>\[\]\(\)]' "$OUTPUT_FILE"; then
echo "❌ Changelog contains markdown/HTML formatting."
exit 1
fi
echo "✅ Changelog valid:"
cat "$OUTPUT_FILE"
# Store changelog for Play Store (with escaped newlines)
CHANGELOG_PLAYSTORE=$(cat "$OUTPUT_FILE" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')
echo "CHANGELOG=${CHANGELOG_PLAYSTORE}" >> $GITHUB_ENV
# Store changelog for Discord (with proper newlines)
CHANGELOG_DISCORD=$(cat "$DISCORD_FILE" | sed 's/"/\\"/g')
echo "CHANGELOG_DISCORD<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG_DISCORD" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Setup keys
uses: timheuer/base64-to-file@v1
with:
fileName: "keystore/ente_photos_key.jks"
encodedString: ${{ secrets.SIGNING_KEY_PHOTOS }}
- name: Build PlayStore AAB
run: |
flutter build appbundle --dart-define=cronetHttpNoPlay=true --release --flavor playstore
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_photos_key.jks"
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}
- name: Upload AAB to PlayStore
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: io.ente.photos
releaseFiles: mobile/apps/photos/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
track: internal
whatsNewDirectory: mobile/apps/photos/whatsnew
mappingFile: mobile/apps/photos/build/app/outputs/mapping/playstoreRelease/mapping.txt
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}
nodetail: true
title: "🏆 Daily release Photos v${{ env.NEW_VERSION }} (Branch: ${{ github.ref_name }})"
description: |
**Version:** ${{ env.NEW_VERSION }}
**Flutter:** ${{ env.FLUTTER_VERSION }}
**Commit:** [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
**Download:** [Play Store](https://play.google.com/store/apps/details?id=io.ente.photos)
**Changes:**
${{ env.CHANGELOG_DISCORD }}
color: 0x00ff00

View File

@@ -1,77 +0,0 @@
name: "Internal release (photos with rust)"
on:
workflow_dispatch: # Allow manually running the action
env:
FLUTTER_VERSION: "3.32.8"
RUST_VERSION: "1.85.1"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile/apps/photos
steps:
- name: Checkout code and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install Rust ${{ env.RUST_VERSION }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Install Flutter Rust Bridge
run: cargo install flutter_rust_bridge_codegen
- name: Setup keys
uses: timheuer/base64-to-file@v1
with:
fileName: "keystore/ente_photos_key.jks"
encodedString: ${{ secrets.SIGNING_KEY_PHOTOS }}
- name: Build PlayStore AAB
run: |
flutter build appbundle --dart-define=cronetHttpNoPlay=true --release --flavor playstore
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_photos_key.jks"
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}
- name: Upload AAB to PlayStore
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: io.ente.photos
releaseFiles: mobile/apps/photos/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
track: internal
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}
nodetail: true
title: "🏆 Internal release available for Photos"
description: "[Download](https://play.google.com/store/apps/details?id=io.ente.photos)"
color: 0x00ff00

View File

@@ -1,68 +0,0 @@
name: "Old Internal release (photos)"
on:
workflow_dispatch: # Allow manually running the action
env:
FLUTTER_VERSION: "3.32.8"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile/apps/photos
steps:
- name: Checkout code and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Setup keys
uses: timheuer/base64-to-file@v1
with:
fileName: "keystore/ente_photos_key.jks"
encodedString: ${{ secrets.SIGNING_KEY_PHOTOS }}
- name: Build PlayStore AAB
run: |
flutter build appbundle --dart-define=cronetHttpNoPlay=true --release --flavor playstore
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_photos_key.jks"
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}
- name: Upload AAB to PlayStore
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: io.ente.photos
releaseFiles: mobile/apps/photos/build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
track: internal
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}
nodetail: true
title: "🏆 Internal release Photos (Branch: ${{ github.ref_name }})"
description: "[Download](https://play.google.com/store/apps/details?id=io.ente.photos)"
color: 0x00ff00

View File

@@ -1,24 +1,22 @@
name: "Lint (mobile)"
on:
# Run on every pull request (open or push to it) that changes mobile/
pull_request:
# Run on every push to a branch other than main that changes mobile/
push:
branches-ignore: [main]
paths:
- "mobile/apps/photos/**"
- "mobile/**"
- ".github/workflows/mobile-lint.yml"
env:
FLUTTER_VERSION: "3.32.8"
permissions:
contents: read
FLUTTER_VERSION: "3.13.4"
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mobile/apps/photos
working-directory: mobile
steps:
- name: Checkout code and submodules
uses: actions/checkout@v4

View File

@@ -9,10 +9,7 @@ on:
- "photos-v*"
env:
FLUTTER_VERSION: "3.32.8"
permissions:
contents: write
FLUTTER_VERSION: "3.13.4"
jobs:
build:
@@ -20,7 +17,7 @@ jobs:
defaults:
run:
working-directory: mobile/apps/photos
working-directory: mobile
steps:
- name: Checkout code and submodules
@@ -28,11 +25,6 @@ jobs:
with:
submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
uses: subosito/flutter-action@v2
with:
@@ -48,7 +40,7 @@ jobs:
- name: Build independent APK
run: |
flutter build apk --dart-define=cronetHttpNoPlay=true --release --flavor independent
flutter build apk --release --flavor independent
mv build/app/outputs/flutter-apk/app-independent-release.apk build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk
env:
SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_photos_key.jks"
@@ -57,10 +49,10 @@ jobs:
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}
- name: Checksum
run: sha256sum build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk > build/app/outputs/flutter-apk/sha256sum
run: sha256sum build/app/outputs/flutter-apk/ente.apk > build/app/outputs/flutter-apk/sha256sum
- name: Create a draft GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "mobile/apps/photos/build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk,mobile/apps/photos/build/app/outputs/flutter-apk/sha256sum"
artifacts: "mobile/build/app/outputs/flutter-apk/ente-${{ github.ref_name }}.apk,mobile/build/app/outputs/flutter-apk/sha256sum"
draft: true

View File

@@ -1,126 +0,0 @@
name: "Internal Release V2 (photos)"
on:
workflow_dispatch: # Manual trigger only
env:
FLUTTER_VERSION: "3.32.8"
ANDROID_KEYSTORE_PATH: "keystore/ente_photos_key.jks"
jobs:
build:
runs-on: macos-latest # Required for iOS builds
environment: "ios-build"
permissions:
contents: write
defaults:
run:
working-directory: mobile/apps/photos
steps:
# Common Setup
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
# Android Build
- name: Setup Android signing key
uses: timheuer/base64-to-file@v1
with:
fileName: ${{ env.ANDROID_KEYSTORE_PATH }}
encodedString: ${{ secrets.SIGNING_KEY_PHOTOS }}
# - name: Build Android AAB
# run: |
# flutter build appbundle \
# --dart-define=cronetHttpNoPlay=true \
# --release \
# --flavor playstore
# env:
# SIGNING_KEY_PATH: ${{ env.ANDROID_KEYSTORE_PATH }}
# SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }}
# SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }}
# SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }}
# iOS Build (new secure implementation)
- name: Install fastlane
run: gem install fastlane
- name: Create ExportOptions.plist
run: |
cat <<EOF > ios/ExportOptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>${{ secrets.IOS_TEAM_ID }}</string>
</dict>
</plist>
EOF
- name: Setup App Store Connect API Key
run: |
echo '${{ secrets.IOS_API_KEY }}' > api_key.json
chmod 600 api_key.json
- name: Build iOS IPA
run: |
flutter build ipa \
--release \
--export-options-plist=ExportOptions.plist \
--dart-define=cronetHttpNoPlay=true
env:
SIGNING_TEAM_ID: ${{ secrets.IOS_TEAM_ID }}
# Uploads
# - name: Upload to Play Store
# uses: r0adkll/upload-google-play@v1
# with:
# serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
# packageName: io.ente.photos
# releaseFiles: build/app/outputs/bundle/playstoreRelease/app-playstore-release.aab
# track: internal
- name: Upload to TestFlight
run: |
fastlane pilot upload \
--api_key_path api_key.json \
--ipa "build/ios/ipa/Ente Photos.ipa" \
--skip_waiting_for_build_processing \
--apple_id ${{ secrets.IOS_APPLE_ID }} \
--app_identifier "io.ente.photos"
env:
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.IOS_API_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.IOS_ISSUER_ID }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.IOS_APP_SPECIFIC_PASSWORD }}
- name: Clean sensitive files
run: |
rm -f api_key.json
rm -f ${{ env.ANDROID_KEYSTORE_PATH }}
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_INTERNAL_RELEASE_WEBHOOK }}
title: "🚀 Dual Platform Release Uploaded"
description: |
**Android**: [Play Store Internal](https://play.google.com/store/apps/details?id=io.ente.photos)
**iOS**: TestFlight build processing
color: 0x00ff00

View File

@@ -1,44 +0,0 @@
name: "Lint (rust)"
on:
# Run on every pull request (open or push to it) that changes rust/
pull_request:
paths:
- "rust/**"
- ".github/workflows/rust-lint.yml"
permissions:
contents: read
# Cancel in-progress lint runs when a new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUSTFLAGS: -D warnings
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo fmt --check
- run: cargo clippy --all-targets --all-features
- run: cargo build

View File

@@ -1,15 +1,13 @@
name: "Lint (server)"
on:
# Run on every pull request (open or push to it) that changes server/
pull_request:
# Run on every push to a branch other than main that changes server/
push:
branches-ignore: [main]
paths:
- "server/**"
- ".github/workflows/server-lint.yml"
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
@@ -23,8 +21,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: server/go.mod
cache-dependency-path: server/go.sum
go-version-file: "server/go.mod"
cache: true
- name: Install dependencies

View File

@@ -1,45 +0,0 @@
name: "Publish ghcr (server)"
on:
# Run automatically on 15th of every month, at 05:00 UTC.
schedule:
- cron: '0 5 15 * *'
# Run manually if needed to publish out of schedule.
workflow_dispatch:
permissions:
contents: write # for pushing the `ghcr/server` branch
packages: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Determine commit from prod museum
run: |
echo "museum_commit=$(curl -s https://api.ente.io/ping | jq -r .id)" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ env.museum_commit }}
- name: Build and push
uses: mr-smithers-excellent/docker-build-push@v6
with:
dockerfile: server/Dockerfile
directory: server
# Resultant package name will be ghcr.io/ente-io/server
image: server
registry: ghcr.io
enableBuildKit: true
multiPlatform: true
platform: linux/amd64,linux/arm64
buildArgs: GIT_COMMIT=${{ env.museum_commit }}
tags: ${{ env.museum_commit }}, latest
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Update branch ghcr/server to point to source commit
run: |
git push -f origin HEAD:refs/heads/ghcr/server

View File

@@ -3,18 +3,15 @@ name: "Release (server)"
on:
workflow_dispatch: # Run manually
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/checkout@v4
name: Check out code
- name: Build and push
uses: mr-smithers-excellent/docker-build-push@v6
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build & Push
with:
dockerfile: server/Dockerfile
directory: server

View File

@@ -1,38 +0,0 @@
name: "Push Crowdin translations (web)"
# This is a variant of web-crowdin-sync.yml that uploads the translated strings in
# addition to the source strings.
#
# This allows us to change the strings in our source code for an automated
# refactoring (e.g. renaming a key), and then run this workflow to update the
# data in Crowdin taking our source code as the source of truth.
on:
# Trigger manually, or using
# `gh workflow run web-crowdin-push-both.yml --ref <my-branch>`
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
push-both-to-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin push
uses: crowdin/github-action@v2
with:
base_path: "web/"
config: "web/crowdin.yml"
upload_sources: true
upload_translations: true
download_translations: false
project_id: 569613
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -1,59 +0,0 @@
name: "Sync Crowdin translations (web)"
on:
push:
branches: [main]
paths:
# Run workflow when web's en-US/translation.json is changed
- "web/packages/base/locales/en-US/translation.json"
# Or the workflow itself is changed
- ".github/workflows/web-crowdin.yml"
schedule:
# Run Mondays at ~6:00 AM IST
#
# [Note: Run workflow on specific days of the week]
#
# The last (5th) component of the cron syntax denotes the day of the
# week, with 0 == SUN and 6 == SAT. So, for example, to run on every TUE
# and FRI, this can be set to `2,5`.
#
# See also: [Note: Run workflow every 24 hours]
- cron: "20 0 * * 1"
# Also allow manually running the workflow.
workflow_dispatch:
# "In order to push translations and create pull requests, the Crowdin GitHub
# action requires the `GITHUB_TOKEN` to have write permission on the `contents`
# and `pull-requests`.
#
# - https://github.com/crowdin/github-action?tab=readme-ov-file#permissions
permissions:
contents: write
pull-requests: write
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v2
with:
base_path: "web/"
config: "web/crowdin.yml"
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: translations/web
create_pull_request: true
skip_untranslated_strings: true
pull_request_title: "[web] New translations"
pull_request_body: "New translations from [Crowdin](https://crowdin.com/project/ente-photos-web)"
pull_request_base_branch_name: "main"
project_id: 569613
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

42
.github/workflows/web-crowdin.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: "Sync Crowdin translations (web)"
on:
push:
paths:
# Run workflow when web's en-US/translation.json is changed
- "web/apps/photos/public/locales/en-US/translation.json"
# Or the workflow itself is changed
- ".github/workflows/web-crowdin.yml"
branches: [main]
schedule:
# See: [Note: Run every 24 hours]
- cron: "20 1 * * *"
# Also allow manually running the workflow
workflow_dispatch:
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Crowdin's action
uses: crowdin/github-action@v1
with:
base_path: "web/"
config: "web/crowdin.yml"
upload_sources: true
upload_translations: true
download_translations: true
localization_branch_name: crowdin-translations-web
create_pull_request: true
skip_untranslated_strings: true
pull_request_title: "[web] New translations"
pull_request_body: "New translations from [Crowdin](https://crowdin.com/project/ente-photos-web)"
pull_request_base_branch_name: "main"
project_id: 569613
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

View File

@@ -0,0 +1,43 @@
name: "Deploy (accounts)"
on:
push:
# Run workflow on pushes to the deploy/accounts
branches: [deploy/accounts]
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build accounts
run: yarn build:accounts
- name: Publish accounts
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: deploy/accounts
directory: web/apps/accounts/out
wranglerVersion: "3"

43
.github/workflows/web-deploy-auth.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: "Deploy (auth)"
on:
push:
# Run workflow on pushes to the deploy/auth
branches: [deploy/auth]
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build auth
run: yarn build:auth
- name: Publish auth
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: deploy/auth
directory: web/apps/auth/out
wranglerVersion: "3"

43
.github/workflows/web-deploy-cast.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: "Deploy (cast)"
on:
push:
# Run workflow on pushes to the deploy/cast
branches: [deploy/cast]
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build cast
run: yarn build:cast
- name: Publish cast
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: deploy/cast
directory: web/apps/cast/out
wranglerVersion: "3"

View File

@@ -1,62 +0,0 @@
name: "Deploy one (web)"
on:
workflow_dispatch:
inputs:
app:
description: "App to build and deploy"
type: choice
required: true
default: "photos"
options:
- "accounts"
- "auth"
- "cast"
- "payments"
- "photos"
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build ${{ inputs.app }}
run: yarn build:${{ inputs.app }}
- name: Publish ${{ inputs.app }} to preview
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# [Note: Wrangler commit-dirty]
#
# Without the --commit-dirty flag, running the wrangler-action
# always prints a warning when used:
#
# Warning: Your working directory is a git repo and has uncommitted changes
# To silence this warning, pass in --commit-dirty=true
#
# There is no clear documentation of if passing this is
# harmless, but all indications and in-practice tests seem to
# indicate so.
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/${{ inputs.app }} web/apps/${{ inputs.app }}/out

43
.github/workflows/web-deploy-photos.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: "Deploy (photos)"
on:
push:
# Run workflow on pushes to the deploy/photos
branches: [deploy/photos]
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build photos
run: yarn build:photos
- name: Publish photos
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: deploy/photos
directory: web/apps/photos/out
wranglerVersion: "3"

View File

@@ -1,51 +0,0 @@
name: "Deploy preview (web)"
on:
workflow_dispatch:
inputs:
app:
description: "App to build and deploy"
type: choice
required: true
default: "photos"
options:
- "accounts"
- "auth"
- "cast"
- "payments"
- "photos"
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build ${{ inputs.app }}
run: yarn build:${{ inputs.app }}
- name: Publish ${{ inputs.app }} to preview
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=preview web/apps/${{ inputs.app }}/out

View File

@@ -1,101 +0,0 @@
name: "Deploy staging (web)"
# Builds the "staging/web" branch if it exists, "main" otherwise.
on:
schedule:
# Run everyday at ~3:00 PM IST
#
# See: [Note: Run workflow every 24 hours]
- cron: "25 9 * * *"
# Also allow manually running the workflow
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Determine branch to build
id: select-branch
working-directory: ${{ github.workspace }}
run: |
if git ls-remote --exit-code --heads https://github.com/ente-io/ente refs/heads/staging/web; then
echo "branch=staging/web" >> $GITHUB_OUTPUT
else
echo "branch=main" >> $GITHUB_OUTPUT
fi
- name: Checkout ${{ steps.select-branch.outputs.branch }}
uses: actions/checkout@v4
with:
ref: ${{ steps.select-branch.outputs.branch }}
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build photos
run: yarn build:photos
env:
NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT: https://albums.ente.sh
- name: Publish photos
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=n-photos web/apps/photos/out
- name: Build accounts
run: yarn build:accounts
- name: Publish accounts
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=n-accounts web/apps/accounts/out
- name: Build auth
run: yarn build:auth
- name: Publish auth
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=n-auth web/apps/auth/out
- name: Build cast
run: yarn build:cast
- name: Publish cast
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=n-cast web/apps/cast/out
- name: Build payments
run: yarn build:payments
- name: Publish payments
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=n-payments web/apps/payments/dist

View File

@@ -1,117 +0,0 @@
name: "Deploy (web)"
on:
schedule:
# [Note: Run workflow every 24 hours]
#
# Run every weekday at ~8:00 AM IST.
#
# First field is minute, second is hour of the day. Last is day of week,
# 0 being Sunday.
#
# Add a few minutes of offset to avoid scheduling on exact hourly
# boundaries (recommended by GitHub to avoid congestion).
#
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# https://crontab.guru/
#
- cron: "25 2 * * 1-5"
# Also allow manually running the workflow
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
cache: "yarn"
cache-dependency-path: "web/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build photos
run: yarn build:photos
- name: Publish photos
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/photos web/apps/photos/out
- name: Build custom-albums
run: yarn build:photos
env:
NEXT_PUBLIC_ENTE_ONLY_SERVE_ALBUMS_APP: 1
- name: Publish custom-albums
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/custom-albums web/apps/photos/out
- name: Build accounts
run: yarn build:accounts
- name: Publish accounts
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/accounts web/apps/accounts/out
- name: Build auth
run: yarn build:auth
- name: Publish auth
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/auth web/apps/auth/out
- name: Build cast
run: yarn build:cast
- name: Publish cast
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/cast web/apps/cast/out
- name: Build payments
run: yarn build:payments
- name: Publish payments
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/payments web/apps/payments/dist
- name: Build locker
run: yarn build:locker
- name: Publish locker
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/locker web/apps/locker/out

View File

@@ -1,20 +1,13 @@
name: "Lint (web)"
on:
# Run on every pull request (open or push to it) that changes web/
pull_request:
# Run on every push to a branch other than main that changes web/
push:
branches-ignore: [main]
paths:
- "web/**"
- ".github/workflows/web-lint.yml"
permissions:
contents: read
# Cancel in-progress lint runs when a new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
@@ -28,7 +21,7 @@ jobs:
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20
cache: "yarn"
cache-dependency-path: "web/yarn.lock"

94
.github/workflows/web-nightly.yml vendored Normal file
View File

@@ -0,0 +1,94 @@
name: "Nightly (web)"
on:
schedule:
# [Note: Run every 24 hours]
#
# Run every 24 hours - First field is minute, second is hour of the day
# This runs 23:15 UTC everyday - 1 and 15 are just arbitrary offset to
# avoid scheduling it on the exact hour, as suggested by GitHub.
#
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# https://crontab.guru/
#
- cron: "15 23 * * *"
# Also allow manually running the workflow
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build accounts
run: yarn build:accounts
- name: Publish accounts
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: n-accounts
directory: web/apps/accounts/out
wranglerVersion: "3"
- name: Build auth
run: yarn build:auth
- name: Publish auth
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: n-auth
directory: web/apps/auth/out
wranglerVersion: "3"
- name: Build cast
run: yarn build:cast
- name: Publish cast
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: n-cast
directory: web/apps/cast/out
wranglerVersion: "3"
- name: Build photos
run: yarn build:photos
env:
NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT: https://albums.ente.sh
- name: Publish photos
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: n-photos
directory: web/apps/photos/out
wranglerVersion: "3"

52
.github/workflows/web-preview.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: "Preview (web)"
on:
workflow_dispatch:
inputs:
app:
description: "App to build and deploy"
type: choice
required: true
default: "photos"
options:
- "accounts"
- "auth"
- "cast"
- "photos"
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup node and enable yarn caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache-dependency-path: "docs/yarn.lock"
- name: Install dependencies
run: yarn install
- name: Build ${{ inputs.app }}
run: yarn build:${{ inputs.app }}
- name: Publish ${{ inputs.app }} to preview
uses: cloudflare/pages-action@1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
projectName: ente
branch: preview
directory: web/apps/${{ inputs.app }}/out
wranglerVersion: "3"

View File

@@ -1,38 +0,0 @@
name: "Publish ghcr (web)"
on:
# Run automatically every Wednesday, at 07:00 UTC.
schedule:
- cron: '0 7 * * 3'
# Run manually if needed to publish out of schedule.
workflow_dispatch:
permissions:
contents: write # for pushing the `ghcr/web` branch
packages: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build and push
uses: mr-smithers-excellent/docker-build-push@v6
with:
dockerfile: web/Dockerfile
directory: web
# Resultant package name will be ghcr.io/ente-io/web
image: web
registry: ghcr.io
enableBuildKit: true
multiPlatform: true
platform: linux/amd64,linux/arm64
tags: ${{ github.sha }}, latest
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Update branch ghcr/web to point to source commit
run: |
git push -f origin HEAD:refs/heads/ghcr/web

3
.gitignore vendored
View File

@@ -1,6 +1,5 @@
# Let folks use their custom editor settings
# Let folks use their custom .vscode settings
.vscode
.idea
# macOS
.DS_Store

22
.gitmodules vendored
View File

@@ -3,9 +3,27 @@
url = https://github.com/ente-io/sentry-dart.git
branch = sentry_flutter_ente
[submodule "auth/flutter"]
path = mobile/apps/auth/flutter
path = auth/flutter
url = https://github.com/flutter/flutter.git
branch = stable
[submodule "auth/assets/simple-icons"]
path = mobile/apps/auth/assets/simple-icons
path = auth/assets/simple-icons
url = https://github.com/simple-icons/simple-icons.git
[submodule "mobile/thirdparty/flutter"]
path = mobile/thirdparty/flutter
url = https://github.com/flutter/flutter.git
branch = stable
[submodule "mobile/plugins/clip_ggml"]
path = mobile/plugins/clip_ggml
url = https://github.com/ente-io/clip-ggml.git
[submodule "mobile/thirdparty/isar"]
path = mobile/thirdparty/isar
url = https://github.com/isar/isar
[submodule "web/apps/photos/thirdparty/ffmpeg-wasm"]
path = web/apps/photos/thirdparty/ffmpeg-wasm
url = https://github.com/abhinavkgrd/ffmpeg.wasm.git
branch = master
[submodule "web/apps/photos/thirdparty/photoswipe"]
path = web/apps/photos/thirdparty/photoswipe
url = https://github.com/ente-io/PhotoSwipe.git
branch = single-thread

View File

@@ -1,42 +1,53 @@
# Contributing
- [Spread the word](#spread-the-word)
- [Engage with the community](#engage-with-the-community)
- [Translate](#translate)
- [Document](#document)
First and foremost, thank you for your interest in contributing to Ente 🙏
There are many ways to contribute, and most of them don't require writing code.
* [Spread the word](#spread-the-word)
* [Engage with the community](#engage-with-the-community)
* [Translate](#translate)
* [Document](#document)
## Spread the word
**This is the most impactful contribution you can make**.
[Spread the word](https://help.ente.io/photos/features/referral-program/). Online on your favorite social media channels. Offline to your friends and family who are looking for a privacy-friendly alternative to big tech.
This is perhaps the most impactful contribution you can make. Spread the word.
Online on your favorite social media channels. Offline to your friends and
family who are looking for a privacy-friendly alternative to big tech.
## Engage with the community
Just hang around, enjoy the vibe. The Ente community — the people who are building Ente, and the people who are using Ente — hang out at various places depending on their proclivity:
Just hang around, enjoy the vibe. Answer someone's query on our
[Discord](https://discord.gg/z2YVKkycX3), or pile on in the sporadic #off-topic
rants there. Chuckle (or wince!) at our [Twitter](https://twitter.com/enteio)
memes. Suggest a new feature in our [Github
Discussions](https://github.com/ente-io/ente/discussions/new?category=feature-requests),
or upvote the existing ones that you feel we should focus on first. Provide your
opinion on existing threads.
- [Discord](https://discord.ente.io)
- [Mastodon](https://fosstodon.org/@ente)
- [X / Twitter](https://twitter.com/enteio)
- [Github Discussions](https://github.com/ente-io/ente/discussions)
Just being around might seem a small thing, but it provides us energy. Knowing that there is a community of people who care for what we are building, **who want us to do better**.
These might seem like small things, but it provides us energy. Knowing that
there is a community of people who care for what we are building.
## Translate
Visit our Crowdin projects to help with translations:
If you're interested in helping out with translation, please visit our Crowdin
projects to get started:
| Project | |
| ------------- | ------------- |
| [Auth](https://crowdin.com/project/ente-authenticator-app) | [![Crowdin](https://badges.crowdin.net/ente-authenticator-app/localized.svg)](https://crowdin.com/project/ente-authenticator-app) |
| [Photos](https://crowdin.com/project/ente-photos-app) | [![Crowdin](https://badges.crowdin.net/ente-photos-app/localized.svg)](https://crowdin.com/project/ente-photos-app) |
| [Photos Web / Desktop](https://crowdin.com/project/ente-photos-web) | [![Crowdin](https://badges.crowdin.net/ente-photos-web/localized.svg)](https://crowdin.com/project/ente-photos-web) |
| Project | |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| [Auth](https://crowdin.com/project/ente-authenticator-app) | [![Crowdin](https://badges.crowdin.net/ente-authenticator-app/localized.svg)](https://crowdin.com/project/ente-authenticator-app) |
| [Photos](https://crowdin.com/project/ente-photos-app) | [![Crowdin](https://badges.crowdin.net/ente-photos-app/localized.svg)](https://crowdin.com/project/ente-photos-app) |
| [Photos Web / Desktop](https://crowdin.com/project/ente-photos-web) | [![Crowdin](https://badges.crowdin.net/ente-photos-web/localized.svg)](https://crowdin.com/project/ente-photos-web) |
If your language is not listed for translation, please [create a GitHub
issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A+%0AProject%3A+auth%2Fphotos%2Fboth)
to have it added. It is okay to have partial translations. Once ~90% of the
strings in a language get translated, we will start surfacing it in the apps.
Thank you for your support.
## Document
The help guides and FAQs for users of Ente products are also open source, and
@@ -48,14 +59,21 @@ See [docs/](docs/README.md) for how to edit these documents.
## Code contributions
If you'd like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more [custom icons to auth](mobile/apps/auth/docs/adding-icons.md), or fixing a specific bug.
If you'd like to contribute code, it is best to start small.
Code that changes the behaviour of the product might not get merged, at least not initially. The PR can serve as a discussion bed, but you might find it easier to just start a discussion instead, or post your perspective in the (likely) existing thread about the behaviour change or new feature you wish for.
Each of the individual product/platform specific directories in this repository
have instructions on setting up a dev environment and making changes. The issues
and discussions (feature requests) labelled "good first issues" should be good
starting points. Once you have a bearing, you can head on to issues or
discussions labelled "help wanted".
## Leave a review or star
If you're planning on adding a new feature or making any other substantial
change, please [discuss it with
us](https://github.com/ente-io/ente/discussions). Discussing your idea with us
first ensures that everyone is on the same page before you start working on your
change.
## Star
If you haven't already done so, consider [starring this
repository](https://github.com/ente-io/ente/stargazers) or leaving a review on
[PlayStore](https://play.google.com/store/apps/details?id=io.ente.auth),
[AppStore](https://apps.apple.com/us/app/ente-authenticator/id6444121398) or
[AlternativeTo](https://alternativeto.net/software/ente-authenticator/).
repository](https://github.com/ente-io/ente/stargazers).

View File

@@ -30,24 +30,23 @@ Learn more at [ente.io](https://ente.io).
![Screenshots of Ente Photos](.github/assets/photos.png)
Our flagship product. 3x data replication. Face detection. Semantic search.
Private sharing. Collaborative albums. Family plans. Easy import, easier export.
Background uploads. The list goes on. And of course, all of this, while being
fully end-to-end encrypted across platforms.
Our flagship product. 3x data replication. On device machine learning. Cross
platform. Private sharing. Collaborative albums. Family plans. Easy import,
easier export. Background uploads. The list goes on. And of course, all of this,
while being fully end-to-end encrypted.
Ente Photos is a paid service, but we offer 10GB of free storage.
You can also clone this repository and choose to self-host.
Ente Photos is a paid service, but we offer a free trial. You can also clone
this repository and choose to self host.
<br />
<div align="center">
[<img height="40" src=".github/assets/app-store-badge.svg">](https://apps.apple.com/app/id1542026904)
[<img height="40" src=".github/assets/play-store-badge.png">](https://play.google.com/store/apps/details?id=io.ente.photos)
[<img height="40" src=".github/assets/f-droid-badge.png">](https://f-droid.org/packages/io.ente.photos.fdroid/)
[<img height="40" src=".github/assets/obtainium-badge.png">](https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/%7B%22id%22%3A%22io.ente.photos.independent%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fente-io%2Fente%22%2C%22author%22%3A%22ente-io%22%2C%22name%22%3A%22Ente%20Photos%22%2C%22preferredApkIndex%22%3A0%2C%22additionalSettings%22%3A%22%7B%5C%22includePrereleases%5C%22%3Afalse%2C%5C%22fallbackToOlderReleases%5C%22%3Atrue%2C%5C%22filterReleaseTitlesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22filterReleaseNotesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22verifyLatestTag%5C%22%3Afalse%2C%5C%22dontSortReleasesList%5C%22%3Atrue%2C%5C%22useLatestAssetDateAsReleaseDate%5C%22%3Afalse%2C%5C%22releaseTitleAsVersion%5C%22%3Afalse%2C%5C%22trackOnly%5C%22%3Afalse%2C%5C%22versionExtractionRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22matchGroupToUse%5C%22%3A%5C%22%5C%22%2C%5C%22versionDetection%5C%22%3Atrue%2C%5C%22releaseDateAsVersion%5C%22%3Afalse%2C%5C%22useVersionCodeAsOSVersion%5C%22%3Afalse%2C%5C%22apkFilterRegEx%5C%22%3A%5C%22ente-photos*%5C%22%2C%5C%22invertAPKFilter%5C%22%3Afalse%2C%5C%22autoApkFilterByArch%5C%22%3Atrue%2C%5C%22appName%5C%22%3A%5C%22%5C%22%2C%5C%22shizukuPretendToBeGooglePlay%5C%22%3Afalse%2C%5C%22allowInsecure%5C%22%3Afalse%2C%5C%22exemptFromBackgroundUpdates%5C%22%3Afalse%2C%5C%22skipUpdateNotifications%5C%22%3Afalse%2C%5C%22about%5C%22%3A%5C%22%5C%22%7D%22%2C%22overrideSource%22%3Anull%7D)
[<img height="40" src=".github/assets/desktop-badge.png">](https://ente.io/download/desktop)
[<img height="40" src=".github/assets/web-badge.svg">](https://web.ente.io)
[<img height="42" src=".github/assets/app-store-badge.svg">](https://apps.apple.com/app/id1542026904)
[<img height="42" src=".github/assets/play-store-badge.png">](https://play.google.com/store/apps/details?id=io.ente.photos)
[<img height="42" src=".github/assets/f-droid-badge.png">](https://f-droid.org/packages/io.ente.photos.fdroid/)
[<img height="42" src=".github/assets/desktop-badge.png">](https://ente.io/download/desktop)
[<img height="42" src=".github/assets/web-badge.svg">](https://web.ente.io)
</div>
@@ -61,19 +60,18 @@ Our labour of love. Two years ago, while building Ente Photos, we realized that
there was no open source end-to-end encrypted authenticator app. We already had
the building blocks, so we built one.
Ente Auth is free, and will remain free forever. If you like the service and
want to give back, please check out Ente Photos or spread the word.
Ente Auth is currently free. If in the future we convert this to a paid service,
existing users will be grandfathered in.
<br />
<div align="center">
[<img height="40" src=".github/assets/app-store-badge.svg">](https://apps.apple.com/app/id6444121398)
[<img height="40" src=".github/assets/play-store-badge.png">](https://play.google.com/store/apps/details?id=io.ente.auth)
[<img height="40" src=".github/assets/f-droid-badge.png">](https://f-droid.org/packages/io.ente.auth/)
[<img height="40" src=".github/assets/obtainium-badge.png">](https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/%7B%22id%22%3A%22io.ente.auth.independent%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fente-io%2Fente%22%2C%22author%22%3A%22ente-io%22%2C%22name%22%3A%22Ente%20Auth%22%2C%22preferredApkIndex%22%3A0%2C%22additionalSettings%22%3A%22%7B%5C%22includePrereleases%5C%22%3Afalse%2C%5C%22fallbackToOlderReleases%5C%22%3Atrue%2C%5C%22filterReleaseTitlesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22filterReleaseNotesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22verifyLatestTag%5C%22%3Afalse%2C%5C%22dontSortReleasesList%5C%22%3Atrue%2C%5C%22useLatestAssetDateAsReleaseDate%5C%22%3Afalse%2C%5C%22releaseTitleAsVersion%5C%22%3Afalse%2C%5C%22trackOnly%5C%22%3Afalse%2C%5C%22versionExtractionRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22matchGroupToUse%5C%22%3A%5C%22%5C%22%2C%5C%22versionDetection%5C%22%3Atrue%2C%5C%22releaseDateAsVersion%5C%22%3Afalse%2C%5C%22useVersionCodeAsOSVersion%5C%22%3Afalse%2C%5C%22apkFilterRegEx%5C%22%3A%5C%22ente-auth*%5C%22%2C%5C%22invertAPKFilter%5C%22%3Afalse%2C%5C%22autoApkFilterByArch%5C%22%3Atrue%2C%5C%22appName%5C%22%3A%5C%22%5C%22%2C%5C%22shizukuPretendToBeGooglePlay%5C%22%3Afalse%2C%5C%22allowInsecure%5C%22%3Afalse%2C%5C%22exemptFromBackgroundUpdates%5C%22%3Afalse%2C%5C%22skipUpdateNotifications%5C%22%3Afalse%2C%5C%22about%5C%22%3A%5C%22%5C%22%7D%22%2C%22overrideSource%22%3Anull%7D)
[<img height="40" src=".github/assets/desktop-badge.png">](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v4)
[<img height="40" src=".github/assets/web-badge.svg">](https://auth.ente.io)
[<img height="42" src=".github/assets/app-store-badge.svg">](https://apps.apple.com/app/id6444121398)
[<img height="42" src=".github/assets/play-store-badge.png">](https://play.google.com/store/apps/details?id=io.ente.auth)
[<img height="42" src=".github/assets/f-droid-badge.png">](https://f-droid.org/packages/io.ente.auth/)
[<img height="42" src=".github/assets/github-badge.png">](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v2)
[<img height="42" src=".github/assets/web-badge.svg">](https://auth.ente.io)
</div>
@@ -95,13 +93,13 @@ please see our [support guide](SUPPORT.md).
<img src=".github/assets/ente-ducky.png" width=200 alt="Ente's Mascot, Ducky,
inviting people to Ente's source code repository" />
Please visit the [community section](https://ente.io/about#community) for all the ways to
connect with our community.
Please visit our [community page](https://ente.io/community) for all the ways to
connect with the community.
[![Discord](https://img.shields.io/discord/948937918347608085?style=for-the-badge&logo=Discord&logoColor=white&label=Discord)](https://discord.gg/z2YVKkycX3)
[![Ente's Blog RSS](https://img.shields.io/badge/blog-rss-F88900?style=for-the-badge&logo=rss&logoColor=white)](https://ente.io/blog/rss.xml)
[![Twitter](.github/assets/twitter.svg)](https://twitter.com/enteio) &nbsp; [![Mastodon](.github/assets/mastodon.svg)](https://fosstodon.org/@ente)
[![Twitter](.github/assets/twitter.svg)](https://twitter.com/enteio) &nbsp; [![Mastodon](.github/assets/mastodon.svg)](https://mstdn.social/@ente)
---

View File

@@ -1,54 +1,51 @@
# Security Policy
Ente believes that working with security researchers across the globe is crucial
to keeping our users safe. If you believe you've found a security issue in our
product or service, we encourage you to notify us by email at security@ente.io
or by
[filling out this form](https://github.com/ente-io/ente/security/advisories/new).
We welcome working with you to resolve the issue promptly. Thanks in advance!
product or service, we encourage you to notify us, by email (security@ente.io)
or by [filling this
form](https://github.com/ente-io/ente/security/advisories/new) We welcome
working with you to resolve the issue promptly. Thanks in advance!
## Disclosure Policy
- Let us know as soon as possible upon discovery of a potential security
issue, and we'll make every effort to quickly resolve the issue.
- Provide us with a reasonable amount of time to resolve the issue before any
disclosure to the public or a third party. We may publicly disclose the
issue before resolving it if appropriate.
- Make a good faith effort to avoid privacy violations, destruction of data,
and interruption or degradation of our service. Only interact with accounts
you own or with the explicit permission of the account holder.
- If you would like to encrypt your report, please use the PGP key with long
ID `E273695C0403F34F74171932DF6DDDE98EBD2394` (available in the public
keyserver pool).
- Let us know as soon as possible upon discovery of a potential security issue,
and we'll make every effort to quickly resolve the issue.
- Provide us a reasonable amount of time to resolve the issue before any
disclosure to the public or a third-party. We may publicly disclose the issue
before resolving it, if appropriate.
- Make a good faith effort to avoid privacy violations, destruction of data, and
interruption or degradation of our service. Only interact with accounts you
own or with explicit permission of the account holder.
- If you would like to encrypt your report, please use the PGP key with long ID
`E273695C0403F34F74171932DF6DDDE98EBD2394` (available in the public keyserver
pool).
## In-scope
- Security issues in any current release of Ente's services. Product downloads
are available at [https://ente.io](https://ente.io). Source code is
available at [https://github.com/ente-io](https://github.com/ente-io).
- Security issues in any current release of Ente's services. Product downloads
are available at https://ente.io. Source code is available at
https://github.com/ente-io.
## Exclusions
The following bug classes are out of scope:
The following bug classes are out-of scope:
- Bugs that are already reported on any of
[Ente's issue trackers](https://github.com/ente-io) or that we already know
of (note that some of our issue tracking is private).
- Issues in an upstream software dependency (e.g., Flutter, Next.js, etc.)
that are already reported to the upstream maintainer.
- Attacks requiring physical access to a user's device.
- Self-XSS.
- Issues related to software or protocols not under Ente's control.
- Vulnerabilities in outdated versions of Ente.
- Missing security best practices that do not directly lead to a
vulnerability.
- Issues that do not have any impact on the general public.
- Bugs that are already reported on any of [Ente's issue
trackers](https://github.com/ente-io), or that we already know of (Note that
some of our issue tracking is private)
- Issues in an upstream software dependency (ex: Flutter, Next.js etc) which are
already reported to the upstream maintainer
- Attacks requiring physical access to a user's device
- Self-XSS
- Issues related to software or protocols not under ente's control
- Vulnerabilities in outdated versions of ente
- Missing security best practices that do not directly lead to a vulnerability
- Issues that do not have any impact on the general public
While researching, we'd like to ask you to refrain from:
- Denial of service
- Spamming
- Social engineering (including phishing) of Ente staff or contractors
- Any physical attempts against Ente property or data centers
- Denial of service
- Spamming
- Social engineering (including phishing) of Ente staff or contractors
- Any physical attempts against Ente property or data centers
Thank you for helping keep Ente and our users safe!

34
auth/.gitignore vendored Normal file
View File

@@ -0,0 +1,34 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
android/key.properties

36
auth/.metadata Normal file
View File

@@ -0,0 +1,36 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
version:
revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
channel: unknown
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- platform: linux
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- platform: macos
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
- platform: windows
create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

107
auth/README.md Normal file
View File

@@ -0,0 +1,107 @@
# Ente Auth
Ente's 2FA app. An end-to-end encrypted, cross platform and free app for
storing your 2FA codes with cloud backups. Works offline. You can even use it
without signing up for an account if you don't want the cloud backups or
multi-device sync.
![App Screenshots](./screenshots/screenshots.png)
## 📲 Download
### Android
This repository's [GitHub
releases](https://github.com/ente-io/ente/releases?q=tag%3Aauth-v2)
contains APKs, built straight from source. These builds keep themselves updated,
without relying on third party stores.
You can alternatively install the build from PlayStore or F-Droid.
<a href="https://play.google.com/store/apps/details?id=io.ente.auth">
<img height="59" src="../.github/assets/play-store-badge.png">
</a>
<a href="https://f-droid.org/packages/io.ente.auth/">
<img height="59" src="../.github/assets/f-droid-badge.png">
</a>
### iOS / Apple Silicon macOS
<a href="https://apps.apple.com/us/app/ente-authenticator/id6444121398">
<img height="59" src="../.github/assets/app-store-badge.svg">
</a>
### Web
You can view your 2FA codes at [auth.ente.io](https://auth.ente.io). For adding
or managing your secrets, please use our mobile app.
### Desktop
A native desktop app is coming soon!
## 🧑‍💻 Build from source
1. [Install Flutter](https://flutter.dev/docs/get-started/install)
2. Pull in all submodules with `git submodule update --init --recursive`
3. For Android, [setup your
keystore](https://docs.flutter.dev/deployment/android#create-an-upload-keystore)
and run `flutter build apk --release --flavor independent`
4. For iOS, run `flutter build ios`
## ⚙️ Develop
For Android, use
```sh
flutter run -t lib/main.dart --flavor independent
```
For iOS, use `flutter run`
VSCode users might find it useful to copy [docs/vscode](docs/vscode) into a top
level `.vscode`.
If the code you're working needs to modify user facing strings, see
[docs/localization](docs/localization.md).
## 🔩 Architecture
The architecture that powers end-to-end encrypted storage and sync of your
tokens has been documented [here](../architecture/README.md).
## 🌍 Translate
[![Crowdin](https://badges.crowdin.net/ente-authenticator-app/localized.svg)](https://crowdin.com/project/ente-authenticator-app)
If you're interested in helping out with translation, please visit our [Crowdin
project](https://crowdin.com/project/ente-photos-app) to get started. Thank you
for your support.
If your language is not listed for translation, please [create a GitHub
issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A)
to have it added.
## 🧑‍🎨 Icons
Ente Auth supports the icon pack provided by
[simple-icons](https://github.com/simple-icons/simple-icons). If you wish to add
more, see [docs/adding-icons](docs/adding-icons.md).
## 💚 Contribute
For more ways to contribute, see [../CONTRIBUTING.md](../CONTRIBUTING.md).
You can also support us by giving this project a ⭐ star on GitHub or by leaving
a review on
[PlayStore](https://play.google.com/store/apps/details?id=io.ente.auth),
[AppStore](https://apps.apple.com/us/app/ente-authenticator/id6444121398) or
[AlternativeTo](https://alternativeto.net/software/ente-authenticator/).
## ⭐️ About
To know more about Ente and the ways to get in touch or seek help, see [our main
README](../README.md) or visit [ente.io](https://ente.io).

13
auth/android/.gitignore vendored Normal file
View File

@@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks

View File

@@ -0,0 +1,116 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 33
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
warningsAsErrors false
checkReleaseBuilds false
}
defaultConfig {
applicationId "io.ente.auth"
minSdkVersion 20
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
signingConfigs {
release {
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : System.getenv("SIGNING_KEY_PATH") ? file(System.getenv("SIGNING_KEY_PATH")) : null
keyAlias keystoreProperties['keyAlias'] ? keystoreProperties['keyAlias'] : System.getenv("SIGNING_KEY_ALIAS")
keyPassword keystoreProperties['keyPassword'] ? keystoreProperties['keyPassword'] : System.getenv("SIGNING_KEY_PASSWORD")
storePassword keystoreProperties['storePassword'] ? keystoreProperties['storePassword'] : System.getenv("SIGNING_STORE_PASSWORD")
}
}
flavorDimensions "default"
productFlavors {
independent {
dimension "default"
applicationIdSuffix ".independent"
}
playstore {
dimension "default"
}
fdroid {
dimension "default"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
debug {
applicationIdSuffix '.debug'
versionNameSuffix "-debug"
externalNativeBuild {
cmake {
arguments "-DANDROID_PACKAGE_NAME=${android.defaultConfig.applicationId}${applicationIdSuffix}"
}
}
}
}
android.applicationVariants.all { variant ->
if (variant.flavorName == "fdroid") {
variant.outputs.all { output ->
output.outputFileName = "app-fdroid-release.apk"
}
}
}
}
flutter {
source '../..'
}
dependencies {
implementation 'io.sentry:sentry-android:2.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}

View File

@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.ente.auth">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,71 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="io.ente.auth">
<application android:name="${applicationName}"
android:label="auth"
android:icon="@mipmap/launcher_icon"
android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true"
android:allowBackup="false"
android:fullBackupContent="false"
android:largeHeap="true">
<activity android:name=".MainActivity" android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="ente-auth"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="otpauth" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="enteauth" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data android:name="flutterEmbedding" android:value="2"/>
<meta-data android:name="io.sentry.dsn"
android:value="https://ed4ddd6309b847ba8849935e26e9b648@sentry.ente.io/9"/>
</application>
<queries>
<intent>
<action android:name="android.intent.action.SENDTO"/>
<data android:scheme="mailto"/>
</intent>
</queries>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29"
tools:ignore="ScopedStorage"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Some files were not shown because too many files have changed in this diff Show More