Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
sharunkumar committed Nov 14, 2024
2 parents ad973d8 + 39e1a35 commit be1dfd9
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 8 deletions.
37 changes: 32 additions & 5 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,33 @@ on:

env:
APP_GIT_REF: ${{ inputs.is_main_build && github.sha || github.ref_name }}
APP_BUILD: ${{ inputs.app_build }}

concurrency:
group: release

jobs:
# get app build env from git commit message
app_build:
runs-on: ubuntu-latest
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
steps:
- if: inputs.is_main_build != true
run: |
# get app build in parentheses from commit message
APP_BUILD=$(echo "$COMMIT_MSG" | sed -n 's/.*(\([0-9]*\)).*/\1/p')
# verify app_build is a number
if echo "$APP_BUILD" | grep -qE '^[0-9]+$'; then
echo "app_build=$APP_BUILD" >> $GITHUB_OUTPUT
fi
outputs:
app_build: ${{ inputs.app_build || steps.app_build.outputs.app_build }}

build_web:
needs: app_build
runs-on: ubuntu-latest
env:
APP_BUILD: ${{ needs.app_build.outputs.app_build }}
steps:
- uses: actions/checkout@v4

Expand All @@ -39,13 +58,12 @@ jobs:
run: pnpm build

- name: Upload dist bundle to S3
if: inputs.is_main_build != true
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks --delete
env:
SOURCE_DIR: dist
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_S3_BUCKET: ${{ inputs.is_main_build && 'beta.vger.app' || 'vger.app'}}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Expand All @@ -60,8 +78,11 @@ jobs:
path: Voyager-Web-${{ env.APP_GIT_REF }}.zip

build_ios:
needs: app_build
environment: deploy
runs-on: macos-latest
runs-on: macos-15
env:
APP_BUILD: ${{ needs.app_build.outputs.app_build }}
steps:
- uses: actions/checkout@v4

Expand All @@ -75,7 +96,7 @@ jobs:
with:
node-version: 22

- uses: maxim-lobanov/setup-xcode@v1
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: latest-stable

Expand Down Expand Up @@ -116,7 +137,10 @@ jobs:
path: Voyager-iOS-${{ env.APP_GIT_REF }}.ipa

build_android:
needs: app_build
runs-on: ubuntu-latest
env:
APP_BUILD: ${{ needs.app_build.outputs.app_build }}
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -164,8 +188,11 @@ jobs:
path: Voyager-Android-${{ env.APP_GIT_REF }}.apk

build_android_play:
needs: app_build
environment: deploy
runs-on: ubuntu-latest
env:
APP_BUILD: ${{ needs.app_build.outputs.app_build }}
steps:
- uses: actions/checkout@v4

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ However, if you prefer using the Progressive Web App, there are a number of folk

> **Note**: Community deployments are **NOT** maintained by the Voyager team. They may not be synced with Voyager's source code. Please do your own research about the host servers before using them.
### Beta Testing

Voyager maintains a beta track continuously deployed from every commit to [`refs/heads/main`](https://github.com/aeharding/voyager/commits/main)). **The beta build may break at any time.**

- [iOS – Testflight](https://testflight.apple.com/join/nWLw1MBM)
- [Android – Google Play Open Testing](https://play.google.com/apps/testing/app.vger.voyager)
- [Web App – beta.vger.app](https://beta.vger.app)

### Self-Host

There are two ways you can run Voyager as a PWA in a production environment. The recommended method is using **docker**. We also support a **traditional** deployment method without docker. Read below to see how to get each method set up.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "voyager",
"description": "A progressive webapp Lemmy client",
"private": true,
"version": "2.19.1",
"version": "2.19.2",
"type": "module",
"packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228",
"scripts": {
Expand Down
8 changes: 7 additions & 1 deletion src/routes/TabbedRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ function InnerTabbedRoutes({
if (pathnameSections <= 1) return;

function push() {
router.push(`/${tabRef?.current || "posts"}`, "none", "push");
// TODO requestAnimationFrame workaround added for regression caused in react 19 upgrades,
// broke right after eda26916b56ca0593f4711516a3ef3048f75fbb6. needs investigation
// repro: be completely logged out. restart app. login. go to a post, go back,
// repeat navigations, see issue
requestAnimationFrame(() => {
router.push(`/${tabRef?.current || "posts"}`, "none", "push");
});
}

// have to wait for the ActorRedirect to do its thing, so it doesn't get clobbered
Expand Down
3 changes: 2 additions & 1 deletion src/routes/pages/settings/about/AppDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const AppContainer = styled.div`
const buildInfo = (() => {
if (import.meta.env.DEV) return <IonText color="danger">Development</IonText>;

if (APP_BUILD)
// If the app version is different from the git ref (tag), it's a pre-release
if (APP_GIT_REF !== APP_VERSION)
return (
<IonText color="warning">
Beta Track — [{APP_BUILD}] {APP_GIT_REF.slice(0, 7)}
Expand Down

0 comments on commit be1dfd9

Please sign in to comment.