From ab25fb933e8b6b2a7e5d6b615d05aae6478e6216 Mon Sep 17 00:00:00 2001 From: Alexander Harding Date: Wed, 13 Nov 2024 19:39:51 -0600 Subject: [PATCH] ci: beta.vger.app support (#1715) --- .github/workflows/build_release.yml | 32 +++++++++++++++++-- README.md | 8 +++++ .../pages/settings/about/AppDetails.tsx | 3 +- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index b24a9bbd47..fa41b647f7 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -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 @@ -45,7 +64,7 @@ jobs: 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 }} @@ -60,8 +79,11 @@ jobs: path: Voyager-Web-${{ env.APP_GIT_REF }}.zip build_ios: + needs: app_build environment: deploy runs-on: macos-latest + env: + APP_BUILD: ${{ needs.app_build.outputs.app_build }} steps: - uses: actions/checkout@v4 @@ -116,7 +138,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 @@ -164,8 +189,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 diff --git a/README.md b/README.md index 58633cd963..b812cb5d8b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/routes/pages/settings/about/AppDetails.tsx b/src/routes/pages/settings/about/AppDetails.tsx index a3c1bb3b57..149d1d2b58 100644 --- a/src/routes/pages/settings/about/AppDetails.tsx +++ b/src/routes/pages/settings/about/AppDetails.tsx @@ -25,7 +25,8 @@ const AppContainer = styled.div` const buildInfo = (() => { if (import.meta.env.DEV) return Development; - 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 ( Beta Track — [{APP_BUILD}] {APP_GIT_REF.slice(0, 7)}