Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in a workflow for building locally #1092

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
40 changes: 40 additions & 0 deletions .github/workflows/local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This is a workflow intended to be run locally using `act` and `docker` to
# build locally

name: local

# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
local-build:
# The type of runner that the job will run on
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
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "17"
- name: Setup Android SDK
uses: android-actions/[email protected]
- name: Build APK
run: ./gradlew assembleDebug
- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: android_app/app/build/outputs/apk/
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ Open-source weight and body metrics tracker, with support for Bluetooth scales

Install [openScale-dev-build.apk](https://github.com/oliexdev/openScale/releases/tag/dev-build) to get the latest development build generated by GitHub Actions. Also be aware that this version may contain bugs and you don't get any automatic updates.

# Building locally :construction_worker:
It is possible to build an apk locally for development purposes using [act](https://github.com/nektos/act) and [docker](https://docker.com/).


## Quick start to build an apk locally
```sh
act -j local-build --artifact-server-path ~/Downloads/artifacts
```

Once run there will be a zipped artefact in `~/Downloads/artifacts` which you can unzip to see the generated apk file.

# Summary :clipboard:

Monitor and track your weight, BMI, body fat, body water, muscle and other body metrics in an open source app that:
Expand Down