Skip to content

Commit 4fcf036

Browse files
authored
Build Android App (#28)
* Build Android App * Add badge for Android build
1 parent 0cac043 commit 4fcf036

File tree

5 files changed

+61
-0
lines changed

5 files changed

+61
-0
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build Android App
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-android:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- uses: sparkfabrik/[email protected]
17+
with:
18+
project-path: ${{ github.workspace }}

.github/workflows/check-badges.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Check badges in README.md
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
check-badges:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Check badges in README.md
17+
run: ./scripts/check-badges.bash "README.md"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Android Application for Barcode Processing in the Cloud via REST API
22

3+
[![Build Android App](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-android/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-android/actions/workflows/build.yml)
34
![API version: 3.0](https://img.shields.io/badge/api-v3.0-lightgrey)
45
[![GitHub license](https://img.shields.io/github/license/aspose-barcode-cloud/aspose-barcode-cloud-android)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-android)
56

gradlew

100644100755
File mode changed.

scripts/check-badges.bash

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
readme_file=$1
5+
6+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
7+
8+
pushd "${SCRIPT_DIR}/.." >/dev/null
9+
10+
(grep -oP '[^/]+\.yml(?=/badge.svg)' "${readme_file}" || (>&2 echo "No badges in ${readme_file}" ; exit 1)) | while read -r workflow_file; do
11+
path_to_workflow=".github/workflows/${workflow_file}"
12+
if [ ! -e "${path_to_workflow}" ]
13+
then
14+
>&2 echo "Error, workflow does not exist \"${path_to_workflow}\""
15+
exit 1
16+
fi
17+
done
18+
19+
(grep -oP '[^/]+\.yml/badge.svg(?!\?branch=main)' "${readme_file}" || echo ) | while read -r badge_without_branch; do
20+
if [ -z "${badge_without_branch}" ]; then continue; fi
21+
>&2 echo "Badge without branch \"${badge_without_branch}\""
22+
exit 1
23+
done
24+
25+
popd >/dev/null

0 commit comments

Comments
 (0)