diff --git a/.github/assets/github-badge.png b/.github/assets/github-badge.png new file mode 100644 index 0000000000000000000000000000000000000000..ef3207c95dede097f6013173c81e8c576c4c4417 Binary files /dev/null and b/.github/assets/github-badge.png differ diff --git a/.github/assets/mastodon.svg b/.github/assets/mastodon.svg new file mode 100644 index 0000000000000000000000000000000000000000..e35204864c74bad7d14906827ccff7f9a6d40b4d --- /dev/null +++ b/.github/assets/mastodon.svg @@ -0,0 +1,3 @@ + + + diff --git a/.github/assets/twitter.svg b/.github/assets/twitter.svg new file mode 100644 index 0000000000000000000000000000000000000000..1fb6a5f1146ad610789bf2a67394af5c8b426d59 --- /dev/null +++ b/.github/assets/twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/.github/workflows/auth-crowdin.yml b/.github/workflows/auth-crowdin.yml index a4800ea738e4b893be2a495cb0ea0e8e95f45705..ea67dec7cfb805395f392d9f3769dfb53271894c 100644 --- a/.github/workflows/auth-crowdin.yml +++ b/.github/workflows/auth-crowdin.yml @@ -32,8 +32,8 @@ jobs: localization_branch_name: crowdin-translations-auth create_pull_request: true skip_untranslated_strings: true - pull_request_title: "New translations (auth)" - pull_request_body: "New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)" + 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: diff --git a/.github/workflows/auth-lint.yml b/.github/workflows/auth-lint.yml index 68fc51643966d2cfd4d7f6f2b2239049a677213e..fff7fb75f5243505b100af1cbb6f0ad5b3612c62 100644 --- a/.github/workflows/auth-lint.yml +++ b/.github/workflows/auth-lint.yml @@ -10,6 +10,9 @@ on: - "auth/**" - ".github/workflows/auth-lint.yml" +env: + FLUTTER_VERSION: "3.16.9" + jobs: lint: runs-on: ubuntu-latest @@ -17,20 +20,21 @@ jobs: run: working-directory: auth steps: - # Checkout our code, including submodules - - uses: actions/checkout@v4 + - name: Checkout code and submodules + uses: actions/checkout@v4 with: submodules: recursive - # Install Flutter - - uses: subosito/flutter-action@v2 + - name: Install Flutter ${{ env.FLUTTER_VERSION }} + uses: subosito/flutter-action@v2 with: channel: "stable" - flutter-version: "3.13.4" + flutter-version: ${{ env.FLUTTER_VERSION }} cache: true - # Install dependencies - run: flutter pub get - # Lint - run: flutter analyze --no-fatal-infos + + - name: Verify custom icon JSON + run: cat assets/custom-icons/_data/custom-icons.json | jq empty diff --git a/.github/workflows/auth-release.yml b/.github/workflows/auth-release.yml index e496b492c6a0efec9f6d2e69eab505a014877017..0adaaca287841da4fad0601718952c90c1e1bb28 100644 --- a/.github/workflows/auth-release.yml +++ b/.github/workflows/auth-release.yml @@ -1,14 +1,13 @@ name: "Release (auth)" +# [Note: Testing release workflows that are triggered by tags] +# # To test this out, push a tag with a pre-release version. The version number # should be the version number of the next actual release. # # > When major, minor, and patch are equal, a pre-release version has lower -# > precedence than a normal version: -# > -# > Example: 1.0.0-alpha < 1.0.0. -# > -# > - https://semver.org +# > precedence than a normal version. Example: 1.0.0-alpha < 1.0.0. +# > https://semver.org # # So if the next release we intend to put out is 1.2.3, you can: # @@ -38,7 +37,6 @@ jobs: defaults: run: - # Run all the "run" steps inside the auth directory working-directory: auth steps: @@ -63,7 +61,7 @@ jobs: - name: Create artifacts directory run: mkdir artifacts - - name: Build Android APK + - name: Build independent APK run: | 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 @@ -115,13 +113,13 @@ jobs: uses: ncipollo/release-action@v1 with: artifacts: "auth/artifacts/*" - prerelease: true draft: true allowUpdates: true updateOnlyUnreleased: true - name: Upload AAB to PlayStore - # Temporarily disable GP upload + # Temporarily disable GP upload, enable this once desktop build + # testing is complete. if: false uses: r0adkll/upload-google-play@v1 with: @@ -135,7 +133,6 @@ jobs: defaults: run: - # Run all the "run" steps inside the auth directory working-directory: auth steps: @@ -189,7 +186,6 @@ jobs: uses: ncipollo/release-action@v1 with: artifacts: "auth/artifacts/*" - prerelease: true draft: true allowUpdates: true updateOnlyUnreleased: true @@ -199,7 +195,6 @@ jobs: defaults: run: - # Run all the "run" steps inside the auth directory working-directory: auth steps: @@ -291,7 +286,6 @@ jobs: uses: ncipollo/release-action@v1 with: artifacts: "auth/artifacts/*" - prerelease: true draft: true allowUpdates: true updateOnlyUnreleased: true diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml new file mode 100644 index 0000000000000000000000000000000000000000..dabfc8dcf717f9aa88ffb6571469771db3560aa2 --- /dev/null +++ b/.github/workflows/cli-release.yml @@ -0,0 +1,51 @@ +name: "Release (cli)" + +on: + push: + # Run when a tag matching the pattern "cli-v*"" is pushed + # + # Tip: to test this workflow, push at tag with a pre-release version, + # e.g. `cli-v1.2.3-test`, where 1.2.3 is the expected version number of + # the next release that'll go out. + # + # See: [Note: Testing release workflows that are triggered by tags] + tags: + - "cli-v*" + +jobs: + draft-release: + runs-on: ubuntu-latest + steps: + - name: Create a draft GitHub release + uses: ncipollo/release-action@v1 + with: + draft: true + + build: + runs-on: ubuntu-latest + needs: draft-release + + strategy: + matrix: + goos: [linux, windows, darwin] + goarch: ["386", amd64, arm64] + exclude: + - goarch: "386" + goos: darwin + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build binaries and add to the release + uses: wangyoucao577/go-release-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + asset_name: ente-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }} + release_name: ${{ github.ref_name }} + goversion: "1.20" + project_path: "./cli" + md5sum: false + sha256sum: true diff --git a/.github/workflows/mobile-crowdin.yml b/.github/workflows/mobile-crowdin.yml index 2dd3c41592c8cea4e43506dbf413f0747761dd04..dbd978745beaf8af8e53588f8f555efabe303334 100644 --- a/.github/workflows/mobile-crowdin.yml +++ b/.github/workflows/mobile-crowdin.yml @@ -32,8 +32,8 @@ jobs: localization_branch_name: crowdin-translations-mobile create_pull_request: true skip_untranslated_strings: true - pull_request_title: "New translations (mobile)" - pull_request_body: "New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)" + 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: diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.yml index 2f5b332af6df83f32ee543cd8a95dc039e6537b1..c2e54d38ae757bebf81ea645817f1ed5296e1b29 100644 --- a/.github/workflows/mobile-lint.yml +++ b/.github/workflows/mobile-lint.yml @@ -10,6 +10,9 @@ on: - "mobile/**" - ".github/workflows/mobile-lint.yml" +env: + FLUTTER_VERSION: "3.13.4" + jobs: lint: runs-on: ubuntu-latest @@ -17,20 +20,18 @@ jobs: run: working-directory: mobile steps: - # Checkout our code, including submodules - - uses: actions/checkout@v4 + - name: Checkout code and submodules + uses: actions/checkout@v4 with: submodules: recursive - # Install Flutter - - uses: subosito/flutter-action@v2 + - name: Install Flutter ${{ env.FLUTTER_VERSION }} + uses: subosito/flutter-action@v2 with: channel: "stable" - flutter-version: "3.13.4" + flutter-version: ${{ env.FLUTTER_VERSION }} cache: true - # Install dependencies - run: flutter pub get - # Lint - run: flutter analyze --no-fatal-infos diff --git a/.github/workflows/mobile-release.yml b/.github/workflows/mobile-release.yml new file mode 100644 index 0000000000000000000000000000000000000000..3868da64a2c36b8822a6facca24818c6ae397beb --- /dev/null +++ b/.github/workflows/mobile-release.yml @@ -0,0 +1,56 @@ +name: "Release (photos independent)" + +on: + workflow_dispatch: # Allow manually running the action + push: + # Run when a tag matching the pattern "photos-v*"" is pushed + # See: [Note: Testing release workflows that are triggered by tags] + tags: + - "photos-v*" + +env: + FLUTTER_VERSION: "3.13.4" + +jobs: + build: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: mobile + + steps: + - name: Checkout code and submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + - 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 independent APK + run: flutter build apk --release --flavor independent && mv build/app/outputs/flutter-apk/app-independent-release.apk build/app/outputs/flutter-apk/ente.apk + env: + SIGNING_KEY_PATH: "/home/runner/work/_temp/keystore/ente_photos_key.jks" + SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS_PHOTOS }} + SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD_PHOTOS }} + SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD_PHOTOS }} + + - name: Checksum + 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/build/app/outputs/flutter-apk/ente.apk,mobile/build/app/outputs/flutter-apk/sha256sum" + draft: true diff --git a/.github/workflows/server-lint.yml b/.github/workflows/server-lint.yml new file mode 100644 index 0000000000000000000000000000000000000000..e23036a6ed48c94b10f95245dd41f568df233201 --- /dev/null +++ b/.github/workflows/server-lint.yml @@ -0,0 +1,33 @@ +name: "Lint (server)" + +on: + # Run on every push (this also covers pull requests) + push: + # See: [Note: Specify branch when specifying a path filter] + branches: ["**"] + # Only run if something changes in these paths + paths: + - "server/**" + - ".github/workflows/server-lint.yml" + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: server + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version-file: "server/go.mod" + cache: true + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install libsodium-dev + + - name: Lint + run: "./scripts/lint.sh" diff --git a/server/.github/workflows/prod-ci.yml b/.github/workflows/server-release.yml similarity index 70% rename from server/.github/workflows/prod-ci.yml rename to .github/workflows/server-release.yml index 791e5218cea5c0507ce41eeb4cf9ec3746dd80a2..8f0281951a2c1a18d1833237a67d6c169dbbfe4e 100644 --- a/server/.github/workflows/prod-ci.yml +++ b/.github/workflows/server-release.yml @@ -1,16 +1,10 @@ -name: Prod CI +name: "Release (server)" on: - workflow_dispatch: - # Enable manual run - push: - # Sequence of patterns matched against refs/tags - tags: - - "v*" # Push events to matching v*, i.e. v4.2.0 + workflow_dispatch: # Run manually jobs: build: - # This job will run on ubuntu virtual machine runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,6 +13,8 @@ jobs: - uses: mr-smithers-excellent/docker-build-push@v6 name: Build & Push with: + dockerfile: server/Dockerfile + directory: server image: ente/museum-prod registry: rg.fr-par.scw.cloud enableBuildKit: true diff --git a/.github/workflows/web-crowdin.yml b/.github/workflows/web-crowdin.yml index 3ff0c9662f6c5214507d02f48ecc13274453ce4b..b55aad55ded2bbc7b0ad0fc0464bc625f0319912 100644 --- a/.github/workflows/web-crowdin.yml +++ b/.github/workflows/web-crowdin.yml @@ -32,8 +32,8 @@ jobs: localization_branch_name: crowdin-translations-web create_pull_request: true skip_untranslated_strings: true - pull_request_title: "New translations (web)" - pull_request_body: "New translations via [Crowdin GH Action](https://github.com/crowdin/github-action)" + 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: diff --git a/.github/workflows/web-lint.yml b/.github/workflows/web-lint.yml index 12c07c869745be40d58f8af83c5b16d58e1d98f3..a905069f67adc138ab2542d6711cdbdacc4ca5e9 100644 --- a/.github/workflows/web-lint.yml +++ b/.github/workflows/web-lint.yml @@ -26,11 +26,16 @@ jobs: run: working-directory: web steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup node and enable yarn caching + uses: actions/setup-node@v4 with: node-version: 20 cache: "yarn" cache-dependency-path: "web/yarn.lock" + - run: yarn install + - run: yarn lint diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ab286d34a15a7e4d023e9c6a369bde045f94304..22fb8ba190ea060ec9f7e439f64a2ab52b5813cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,7 +42,7 @@ projects to get started: 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) +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. @@ -63,8 +63,9 @@ If you'd like to contribute code, it is best to start small. Each of the individual product/platform specific directories in this repository have instructions on setting up a dev environment and making changes. The issues -labelled "good first issues" should be good starting points. Once you have a -bearing, you can head on to issues labelled "help wanted". +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". If you're planning on adding a new feature or making any other substantial change, please [discuss it with diff --git a/README.md b/README.md index de870e301eba8f51e953db4606a8788d1e459895..e99a53e86efc7735776eb183d66571fea85f66f1 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ existing users will be grandfathered in. [](https://apps.apple.com/app/id6444121398) [](https://play.google.com/store/apps/details?id=io.ente.auth) [](https://f-droid.org/packages/io.ente.auth/) +[](https://github.com/ente-io/ente/releases?q=tag%3Av2.0.34&expanded=true) [](https://auth.ente.io) @@ -98,6 +99,8 @@ 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)   [![Mastodon](.github/assets/mastodon.svg)](https://mstdn.social/@ente) + --- ## Security diff --git a/auth/android/app/src/main/AndroidManifest.xml b/auth/android/app/src/main/AndroidManifest.xml index f2f1146ec24253da7795fd1b7e0d34dd7896f668..abe72b565073860b4d6869356a19071e381d899a 100644 --- a/auth/android/app/src/main/AndroidManifest.xml +++ b/auth/android/app/src/main/AndroidManifest.xml @@ -35,6 +35,13 @@ + + + + + + +