Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into persist-share-as-im…
Browse files Browse the repository at this point in the history
…age-choices
  • Loading branch information
sharunkumar committed Nov 11, 2024
2 parents badb846 + 0a0650b commit 7957aa0
Show file tree
Hide file tree
Showing 554 changed files with 14,404 additions and 15,956 deletions.
9 changes: 3 additions & 6 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Chrome >=89
ChromeAndroid >=89
Firefox >=75
Edge >=89
Safari >=15
iOS >=15
last 2 versions
not dead
iOS >= 15
162 changes: 120 additions & 42 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: pnpm

- name: 📦 Install dependencies
Expand All @@ -40,55 +40,133 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Voyager-Web-${{ github.ref_name }}-Build.zip
name: Voyager-Web-${{ github.ref_name }}.zip
path: Voyager-Web-${{ github.ref_name }}.zip

build_ios:
runs-on: ubuntu-latest

runs-on: macos-latest
concurrency:
group: "build_ios"
cancel-in-progress: true
steps:
- name: Build iOS on Appflow
uses: ionic-team/[email protected]
with:
token: ${{ secrets.APPFLOW_TOKEN }}
app-id: 9f0851ec
platform: iOS
build-type: app-store
certificate: Distribution
destinations: Voyager App Store
filename: Voyager-iOS-${{ github.ref_name }}
upload-artifact: Voyager-iOS-${{ github.ref_name }}-Build.zip
build-stack: macOS - 2024.10 - Apple silicon
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Install Fastlane
run: |
gem install bundler
bundle install
- run: corepack enable
- run: pnpm i --frozen-lockfile
- name: Build (Ionic)
run: pnpm exec ionic cap sync
env:
CI_PLATFORM: ios
- name: Deploy to TestFlight
run: |
echo "$APP_STORE_CONNECT_KEY" > authkey.json
bundle exec fastlane deploy
env:
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
COMMIT_MSG: ${{ github.event.commits[0].message }}
- name: Upload iOS IPA as artifact
uses: actions/upload-artifact@v4
with:
name: Voyager-iOS-${{ github.ref_name }}.ipa
path: Voyager-iOS-${{ github.ref_name }}.ipa

build_android_play:
build_android:
runs-on: ubuntu-latest

concurrency:
group: "build_android"
cancel-in-progress: true
steps:
- name: Build Android on Appflow
uses: ionic-team/[email protected]
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
token: ${{ secrets.APPFLOW_TOKEN }}
app-id: 9f0851ec
platform: Android
build-type: release
certificate: Voyager Play Store
destinations: Voyager Play Store
node-version: 22
- run: corepack enable
- run: pnpm i --frozen-lockfile
- name: Build (Ionic)
run: pnpm exec ionic cap sync
env:
BUILD_FOSS_ONLY: 1
CI_PLATFORM: android
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "corretto"
cache: gradle
- name: Build (Android)
run: |
echo $ANDROID_KEYSTORE | base64 --decode > android/app/release-ci.keystore
cd android
./gradlew assembleRelease
env:
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
- run: mv android/app/build/outputs/apk/release/app-release.apk Voyager-Android-${{ github.ref_name }}.apk
- name: Send to Artifacts
uses: actions/upload-artifact@v4
with:
name: Voyager-Android-${{ github.ref_name }}.apk
path: Voyager-Android-${{ github.ref_name }}.apk

build_android:
build_android_play:
runs-on: ubuntu-latest

concurrency:
group: "build_android_play"
cancel-in-progress: true
steps:
- name: Build Android on Appflow
uses: ionic-team/[email protected]
with:
token: ${{ secrets.APPFLOW_TOKEN }}
app-id: 9f0851ec
platform: Android
build-type: release
environment: BuildFOSSOnly
certificate: Voyager Play Store
filename: Voyager-Android-${{ github.ref_name }}
upload-artifact: Voyager-Android-${{ github.ref_name }}-Build.zip
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Install Fastlane
run: |
gem install bundler
bundle install
- run: corepack enable
- run: pnpm i --frozen-lockfile
- name: Build (Ionic)
run: pnpm exec ionic cap sync
env:
CI_PLATFORM: android
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "corretto"
cache: gradle
- name: Build (Android)
run: |
echo $ANDROID_KEYSTORE | base64 --decode > android/app/release-ci.keystore
env:
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
- name: Setup service account
run: echo $GOOGLE_SERVICE_ACCOUNT | base64 --decode > android/pc-api.json
env:
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
- name: Run Fastlane
run: bundle exec fastlane android deploy
env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}

create_release:
needs: [build_web, build_ios, build_android_play, build_android]
Expand All @@ -101,19 +179,19 @@ jobs:
- name: Download dist artifacts
uses: actions/download-artifact@v4
with:
name: Voyager-Web-${{ github.ref_name }}-Build.zip
name: Voyager-Web-${{ github.ref_name }}.zip
path: artifacts/web

- name: Download iOS Artifact
uses: actions/download-artifact@v4
with:
name: Voyager-iOS-${{ github.ref_name }}-Build.zip
name: Voyager-iOS-${{ github.ref_name }}.ipa
path: artifacts/ios

- name: Download Android Artifact
uses: actions/download-artifact@v4
with:
name: Voyager-Android-${{ github.ref_name }}-Build.zip
name: Voyager-Android-${{ github.ref_name }}.apk
path: artifacts/android

- name: Release
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
workflow_dispatch: {}

jobs:
Expand All @@ -20,7 +22,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: pnpm

- name: 📦 Install dependencies
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ on:
push:
branches:
- main
- release/*
tags:
- "*"
pull_request:
branches:
- main
- release/*
jobs:
docker:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public-hoist-pattern[]=workbox-window
ignore-dep-scripts=true
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.removeUnusedImports": "always"
}
"source.fixAll.eslint": "explicit"
},
"eslint.codeActionsOnSave.rules": ["perfectionist/*"]
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ BUILD=123; npx release-it

Make sure the build number is incremental. This is used for F-droid.

Voyager uses [Ionic App Flow](https://ionic.io/appflow) for Apple App Store and Android Play Store builds. Those builds are initiated and monitored by Github Actions, where logs may be inspected.
Voyager uses Github Actions for Apple App Store and Android Play Store builds, where logs may be inspected.

**Voyager's Android and iOS builds are reproducible**! In fact, [F-droid independently builds Voyager](https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/app.vger.voyager.yml) and verifies the same compiled APK is provided in Github Releases.

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ FROM base AS builder
# Prepare deps
RUN apk add --no-cache git

# Prepare build deps ( ignore postinstall scripts for now )
COPY package.json pnpm-lock.yaml ./
# Prepare build deps
COPY package.json pnpm-lock.yaml .npmrc ./
COPY patches ./patches

RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --ignore-scripts
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile

# Copy all source files
COPY build.sh disable_in_app_purchases.sh index.html vite.config.ts manifest.json tsconfig.json ./
COPY prebuild.sh disable_in_app_purchases.sh index.html vite.config.ts manifest.json tsconfig.json compilerOptions.js ./
COPY public ./public
COPY src ./src

Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "fastlane"
Loading

0 comments on commit 7957aa0

Please sign in to comment.