Skip to content
Closed
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
89 changes: 70 additions & 19 deletions .github/workflows/ci_beta.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,90 @@
name: CI beta
name: CI Beta

on:
push:
branches:
- openScale-3.0
pull_request:
branches:
- openScale-3.0
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: write

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
name: Build Beta APK
runs-on: ubuntu-latest

defaults:
run:
working-directory: android_app

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "21"
- name: Build APK
run: ./gradlew assembleBeta
- uses: "marvinpinto/action-automatic-releases@latest"
distribution: 'zulu'
java-version: '21'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build beta APK
run: ./gradlew assembleBeta --stacktrace

- name: Upload beta APK artifact
uses: actions/upload-artifact@v4
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "beta-build"
name: openScale-beta-apk
path: android_app/app/build/outputs/apk/beta/openScale-beta.apk
retention-days: 30

- name: Create automatic release
if: github.event_name == 'push' && github.ref == 'refs/heads/openScale-3.0'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: beta-build
prerelease: true
title: "openScale 3.0 beta build"
title: openScale 3.0 beta build
files: |
android_app/app/build/outputs/apk/beta/openScale-beta.apk

lint:
name: Run Lint Checks
runs-on: ubuntu-latest

defaults:
run:
working-directory: android_app

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

- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run lint
run: ./gradlew lintBeta --stacktrace

- name: Upload lint results
if: always()
uses: actions/upload-artifact@v4
with:
name: lint-results-beta
path: android_app/app/build/reports/lint-results-beta.html
retention-days: 30
94 changes: 69 additions & 25 deletions .github/workflows/ci_master.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,90 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
'master'

# Allows you to run this workflow manually from the Actions tab
- master
pull_request:
branches:
- master
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: write

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
name: Build Debug APK
runs-on: ubuntu-latest

defaults:
run:
working-directory: android_app

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build debug APK
run: ./gradlew assembleDebug --stacktrace

- name: Upload debug APK artifact
uses: actions/upload-artifact@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "21"
- name: Build APK
run: ./gradlew assembleDebug
- uses: "marvinpinto/action-automatic-releases@latest"
name: openScale-debug-apk
path: android_app/app/build/outputs/apk/debug/openScale-debug.apk
retention-days: 30

- name: Create automatic release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "dev-build"
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: dev-build
prerelease: true
title: "openScale development build"
title: openScale development build
files: |
android_app/app/build/outputs/apk/debug/openScale-debug.apk

lint:
name: Run Lint Checks
runs-on: ubuntu-latest

defaults:
run:
working-directory: android_app

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

- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run lint
run: ./gradlew lintDebug --stacktrace

- name: Upload lint results
if: always()
uses: actions/upload-artifact@v4
with:
name: lint-results
path: android_app/app/build/reports/lint-results-debug.html
retention-days: 30