|
1 | | -# This is a basic workflow to help you get started with Actions |
| 1 | +name: Build Release APKs |
2 | 2 |
|
3 | | -name: CI |
4 | | - |
5 | | -# Controls when the workflow will run |
6 | 3 | on: |
7 | | - # Triggers the workflow on push or pull request events but only for the "main" branch |
8 | 4 | push: |
9 | | - branches: [ "main" ] |
10 | | - pull_request: |
11 | | - branches: [ "main" ] |
12 | | - |
13 | | - # Allows you to run this workflow manually from the Actions tab |
14 | | - workflow_dispatch: |
| 5 | + branches: [ main ] |
15 | 6 |
|
16 | | -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
17 | 7 | jobs: |
18 | | - # This workflow contains a single job called "build" |
19 | 8 | build: |
20 | | - # The type of runner that the job will run on |
21 | 9 | runs-on: ubuntu-latest |
22 | 10 |
|
23 | | - # Steps represent a sequence of tasks that will be executed as part of the job |
24 | 11 | steps: |
25 | | - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
26 | | - - uses: actions/checkout@v4 |
| 12 | + - name: 📥 Checkout |
| 13 | + uses: actions/checkout@v4 |
| 14 | + |
| 15 | + - name: 🟢 Setup Node |
| 16 | + uses: actions/setup-node@v4 |
| 17 | + with: |
| 18 | + node-version: 18 |
27 | 19 |
|
28 | | - # Runs a single command using the runners shell |
29 | | - - name: Run a one-line script |
30 | | - run: echo Hello, world! |
| 20 | + - name: ☕ Setup Java |
| 21 | + uses: actions/setup-java@v4 |
| 22 | + with: |
| 23 | + distribution: temurin |
| 24 | + java-version: 17 |
31 | 25 |
|
32 | | - # Runs a set of commands using the runners shell |
33 | | - - name: Run a multi-line script |
| 26 | + - name: 📦 Install dependencies |
| 27 | + run: npm install |
| 28 | + |
| 29 | + - name: ⚙️ Build Release APKs |
34 | 30 | run: | |
35 | | - echo Add other actions to build, |
36 | | - echo test, and deploy your project. |
| 31 | + cd android |
| 32 | + chmod +x gradlew |
| 33 | + ./gradlew assembleRelease |
| 34 | +
|
| 35 | + - name: 📤 Upload APKs |
| 36 | + uses: actions/upload-artifact@v4 |
| 37 | + with: |
| 38 | + name: release-apks |
| 39 | + path: android/app/build/outputs/apk/release/*.apk |
0 commit comments