SpotHole App v1.0.0 #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Publish Release APK | |
on: | |
push: | |
tags: | |
- 'v*.*.*' # Trigger on version tags like v1.0.0 | |
release: | |
types: [published] # Trigger when a release is published | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: | | |
cd App/Pot-Hole-Detector-Frontend | |
npm install | |
- name: Install Expo CLI | |
run: npm install -g expo eas-cli | |
- name: Login to Expo | |
env: | |
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | |
run: eas login --token $EXPO_TOKEN | |
- name: Build Android APK | |
working-directory: App/Pot | |
run: eas build --platform android --profile production | |
- name: Rename and Move APK to Root | |
run: | | |
mv App/Pot-Hole-Detector-Frontend/builds/*.apk ./SpotHole.apk | |
- name: Upload APK as a Release Asset | |
uses: actions/upload-artifact@v3 | |
with: | |
name: SpotHole-APK | |
path: ./SpotHole.apk |