Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 148 additions & 3 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Summary:
#
# Creates a production build of the app that is eventually submitted for distribution.
# This workflow DOES NOT automatically perform the submission - that must still be handled manually.
# Creates a production build of the app and submits it for distribution.
#
# Triggers:
#
Expand All @@ -13,6 +12,9 @@
# - Creates a comment on the (merged) Release Candidate PR with a link to the EAS build process.
# - Creates a release tag named `v${version}` on the merge commit in the targeted `release/**` branch.
# `version` is `<minor>.<patch>` e.g. `1.2.0` is truncated to `2.0`.
# - Waits for EAS build to complete, then:
# - Creates a GitHub Release with the APK downloaded from R2 and release notes attached
# - Submits the AAB to the Google Play Store production track via `eas submit`
name: Build Release

on:
Expand All @@ -21,14 +23,21 @@ on:
- closed
branches:
- 'release/**'
workflow_dispatch:
inputs:
build_id:
description: 'EAS build ID (UUID from expo.dev build URL)'
required: true
type: string

jobs:
build:
name: Build
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
outputs:
eas_build_url: ${{ steps.build.outputs.eas_build_url }}
build_id: ${{ steps.build.outputs.build_id }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -60,12 +69,14 @@ jobs:
exit 1
fi
echo "Build ID: $build_id"
echo "build_id=$build_id" >> $GITHUB_OUTPUT
eas_build_url="$EAS_PROJECT_URL/builds/$build_id"
echo "eas_build_url=$eas_build_url" >> $GITHUB_OUTPUT

comment:
name: Comment
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
needs: build

steps:
Expand All @@ -89,6 +100,7 @@ jobs:
tag:
name: Create release tag
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
needs: build

steps:
Expand Down Expand Up @@ -119,3 +131,136 @@ jobs:
git config --global user.email '${{ vars.RELEASE_BOT_USER_ID }}+awana-release-bot[bot]@users.noreply.github.com'
git tag v${{ steps.version.outputs.release_version_short }}
git push origin v${{ steps.version.outputs.release_version_short }}

github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build, tag]
if: always() && (github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && needs.tag.result == 'success'))
timeout-minutes: 60

steps:
- name: Resolve inputs
id: inputs
run: |
echo "build_id=${{ inputs.build_id || needs.build.outputs.build_id }}" >> $GITHUB_OUTPUT

- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Set up Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: npm ci

- name: Wait for EAS build to finish
env:
BUILD_ID: ${{ steps.inputs.outputs.build_id }}
run: |
echo "Waiting for EAS build $BUILD_ID to complete..."
while true; do
status=$(eas build:view "$BUILD_ID" --json | jq -r '.status')
echo "Build status: $status"
if [ "$status" = "FINISHED" ]; then
echo "Build finished successfully"
break
elif [ "$status" = "ERRORED" ] || [ "$status" = "CANCELED" ]; then
echo "Build failed with status: $status"
exit 1
fi
sleep 60
done

- name: Extract version from EAS build
id: eas_version
env:
BUILD_ID: ${{ steps.inputs.outputs.build_id }}
run: |
version=$(eas build:view "$BUILD_ID" --json | jq -r '.appVersion')
echo "version=$version" >> $GITHUB_OUTPUT

- name: Download APK from R2
env:
VERSION: ${{ steps.eas_version.outputs.version }}
run: |
APK_URL="https://downloads.comapeo.app/android/release/comapeo-v${VERSION}.apk"
echo "Downloading APK from $APK_URL"
curl -fL "$APK_URL" -o "comapeo-v${VERSION}.apk"

- name: Read release notes
id: release_notes
env:
VERSION: ${{ steps.eas_version.outputs.version }}
run: |
MINOR_VERSION=$(echo "$VERSION" | cut -d. -f1)
NOTES_FILE="release-notes/closed-prs-v${MINOR_VERSION}.md"
if [ -f "$NOTES_FILE" ]; then
{
echo "body<<RELEASE_NOTES_EOF"
cat "$NOTES_FILE"
echo "RELEASE_NOTES_EOF"
} >> $GITHUB_OUTPUT
else
echo "body=No release notes found." >> $GITHUB_OUTPUT
fi

- name: Create GitHub Release
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
VERSION: ${{ steps.eas_version.outputs.version }}
RELEASE_BODY: ${{ steps.release_notes.outputs.body }}
run: |
gh release create "v${VERSION}" \
--title "CoMapeo v${VERSION}" \
--notes "$RELEASE_BODY" \
"comapeo-v${VERSION}.apk#CoMapeo Android APK"

submit:
name: Submit to Play Store
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
needs: build

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Set up Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: npm ci

- name: Submit to Google Play Store
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
run: |
eas submit --platform android --profile production --id ${{ needs.build.outputs.build_id }} --non-interactive
7 changes: 6 additions & 1 deletion eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
}
},
"submit": {
"production": {}
"production": {
"android": {
"track": "production",
"releaseStatus": "completed"
}
}
}
}
3 changes: 0 additions & 3 deletions messages/de-DE/primary.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
"$1Navigation.Menu.currentProject": {
"message": "Aktuelles Projekt"
},
"$1Navigation.Menu.earlyAccessLabel": {
"message": "Sie befinden sich im Frühzugriffsmodus."
},
"$1Navigation.Menu.exchange": {
"message": "Umtausch"
},
Expand Down
6 changes: 0 additions & 6 deletions messages/de-DE/secondary.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,6 @@
"screens.DataAndPrivacy.respectsPrivacy": {
"message": "CoMapeo respektiert Ihre Privatsphäre und Unabhängigkeit"
},
"screens.EarlyAccess.feedbackLink": {
"message": "Teilen Sie es hier"
},
"screens.EarlyAccess.feedbackPrefix": {
"message": "Haben Sie Feedback?"
},
"screens.EarlyAccess.infoBox": {
"message": "Daten von Early Access sind für Mitarbeiter, die sich nicht für diesen Zugang entschieden haben, nicht sichtbar."
},
Expand Down
36 changes: 24 additions & 12 deletions messages/en-US/primary.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
"$1Navigation.Menu.currentProject": {
"message": "Current Project"
},
"$1Navigation.Menu.earlyAccessLabel": {
"message": "You are in Early Access Mode."
"$1Navigation.Menu.earlyAccessOn": {
"message": "Early Access ON"
},
"$1Navigation.Menu.earlyAccessTurnOff": {
"message": "Turn Off"
},
"$1Navigation.Menu.exchange": {
"message": "Exchange"
Expand Down Expand Up @@ -137,14 +140,20 @@
"$1Screens.Settings.AppSettings.coordinateDms": {
"message": "Degrees/Min/Sec"
},
"$1Screens.Settings.AppSettings.coordinateSystem": {
"message": "Coordinate System"
},
"$1Screens.Settings.AppSettings.coordinateUtm": {
"message": "UTM Coordinates"
},
"$1Screens.Settings.AppSettings.createTestData": {
"message": "Create Test Data"
"$1Screens.Settings.AppSettings.dataAndPrivacy": {
"message": "Data & Privacy"
},
"$1Screens.Settings.AppSettings.diagnosticInformation": {
"message": "Diagnostic Information"
"$1Screens.Settings.AppSettings.deviceName": {
"message": "Device Name"
},
"$1Screens.Settings.AppSettings.earlyAccess": {
"message": "Early Access"
},
"$1Screens.Settings.AppSettings.earlyAccessOff": {
"message": "Early Access OFF"
Expand All @@ -158,6 +167,12 @@
"$1Screens.Settings.AppSettings.imperial": {
"message": "Imperial"
},
"$1Screens.Settings.AppSettings.language": {
"message": "Language"
},
"$1Screens.Settings.AppSettings.learnMore": {
"message": "Learn More"
},
"$1Screens.Settings.AppSettings.metric": {
"message": "Metric"
},
Expand All @@ -167,12 +182,6 @@
"$1Screens.Settings.AppSettings.passcode": {
"message": "Passcode"
},
"$1Screens.Settings.AppSettings.sharingPermissions": {
"message": "SHARING PERMISSIONS"
},
"$1Screens.Settings.AppSettings.thisDevice": {
"message": "THIS DEVICE"
},
"$1Screens.Settings.AppSettings.title": {
"message": "CoMapeo Settings"
},
Expand All @@ -182,6 +191,9 @@
"$1Screens.Settings.AppSettings.turnOn": {
"message": "Turn On"
},
"$1Screens.Settings.AppSettings.unitSystem": {
"message": "Unit System"
},
"$1TrackBottomSheet.DidNotMove.delete": {
"message": "Exit Tracks"
},
Expand Down
11 changes: 7 additions & 4 deletions messages/en-US/secondary.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
"Screens.ProjectSettings.viewDetails": {
"message": "View Details"
},
"Screens.Settings.AppSettings.createTestData": {
"message": "Create Test Data"
},
"Screens.Settings.AppSettings.testData": {
"message": "Test Data"
},
"Settings.ProjectSettings.RemoteArchive.RemoveRemoteArchive.cancel": {
"description": "Text for cancel action button.",
"message": "Cancel"
Expand Down Expand Up @@ -438,11 +444,8 @@
"screens.DataAndPrivacy.respectsPrivacy": {
"message": "CoMapeo Respects Your Privacy & Autonomy"
},
"screens.EarlyAccess.feedbackLink": {
"message": "Share it here"
},
"screens.EarlyAccess.feedbackPrefix": {
"message": "Have feedback?"
"message": "Have feedback? Share it at"
},
"screens.EarlyAccess.infoBox": {
"message": "Data from Early Access won't be visible to collaborators who haven't opted in."
Expand Down
3 changes: 0 additions & 3 deletions messages/es-419/primary.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
"$1Navigation.Menu.currentProject": {
"message": "Proyecto actual"
},
"$1Navigation.Menu.earlyAccessLabel": {
"message": "Estás en modo de acceso anticipado."
},
"$1Navigation.Menu.exchange": {
"message": "Intercambiar"
},
Expand Down
6 changes: 0 additions & 6 deletions messages/es-419/secondary.json
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,6 @@
"screens.DataAndPrivacy.respectsPrivacy": {
"message": "CoMapeo respeta tu privacidad y autonomía"
},
"screens.EarlyAccess.feedbackLink": {
"message": "Compartir aquí"
},
"screens.EarlyAccess.feedbackPrefix": {
"message": "¿Tienes comentarios?"
},
"screens.EarlyAccess.infoBox": {
"message": "Los datos de acceso anticipado no serán visibles para los colaboradores que no hayan optado por participar."
},
Expand Down
3 changes: 0 additions & 3 deletions messages/fr-FR/primary.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
"$1Navigation.Menu.currentProject": {
"message": "Projet actuel"
},
"$1Navigation.Menu.earlyAccessLabel": {
"message": "Vous êtes en mode accès anticipé."
},
"$1Navigation.Menu.exchange": {
"message": "Échanger"
},
Expand Down
6 changes: 0 additions & 6 deletions messages/fr-FR/secondary.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,6 @@
"screens.DataAndPrivacy.respectsPrivacy": {
"message": "CoMapeo respecte votre vie privée et votre autonomie"
},
"screens.EarlyAccess.feedbackLink": {
"message": "Partagez-le ici"
},
"screens.EarlyAccess.feedbackPrefix": {
"message": "Vous avez des commentaires ?"
},
"screens.EarlyAccess.infoBox": {
"message": "Les données de l'accès anticipé ne seront pas visibles pour les collaborateurs qui ne s'y sont pas engagés."
},
Expand Down
3 changes: 0 additions & 3 deletions messages/id-ID/primary.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
"$1Navigation.Menu.currentProject": {
"message": "Proyek Saat Ini"
},
"$1Navigation.Menu.earlyAccessLabel": {
"message": "Anda berada dalam Mode Akses Awal."
},
"$1Navigation.Menu.exchange": {
"message": "Pertukaran"
},
Expand Down
Loading
Loading