Skip to content

fix: ajustando formatação do apk-build #3

fix: ajustando formatação do apk-build

fix: ajustando formatação do apk-build #3

Workflow file for this run

name: Build and Release APK
on:
push:
branches:
- main
pull_request:
brances:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
- name: Install pnpm
run: |
npm install -g pnpm
- name: Clear Gradle Cache
run: rm -rf ~/.gradle/caches/
- name: Configure cache for Gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Configure cache for Gradle Wrapper
uses: actions/cache@v4
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
- name: Configure cache for Node Modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('pnpm-lock.yaml', 'packages/*/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Setup SSH Keys
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.SSH_PUBLIC_KEY }}" > ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa.pub
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Install dependencies
run: pnpm install --frozen-lockfile --prod=false
- name: Build Using vite
run: pnpm build
- name: Giving access to gradlew
run: cd android && chmod +x gradlew
- name: Giving access to android-build
run: cd scripts && chmod +x apk-build && ./apk-build
- name: Upload APK to GitHub Releases
uses: actions/upload-artifact@v4
with:
name: PR-${{ github.event.number }}
path: ./android/app/release
overwrite: true
retention-days: 1
compression-level: 9