Skip to content

Commit

Permalink
ci: beta.vger.app support (#1715)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeharding authored Nov 14, 2024
1 parent 6ec93e4 commit ab25fb9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
32 changes: 30 additions & 2 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 @@ -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 }}

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

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
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 ab25fb9

Please sign in to comment.