Skip to content

build(deps): bump xmldom, node-appc and titanium #98

build(deps): bump xmldom, node-appc and titanium

build(deps): bump xmldom, node-appc and titanium #98

Workflow file for this run

name: Android Build
on:
push:
paths-ignore:
- 'ios/**'
- 'apidoc/**'
pull_request:
paths-ignore:
- 'ios/**'
- 'apidoc/**'
workflow_dispatch:
jobs:
android:
runs-on: ubuntu-latest
name: Android
env:
SDK_VERSION: 11.0.0.GA
steps:
- uses: actions/checkout@v2
- name: Retrieve package version
run: |
PACKAGE_VERSION=$(sed -n 's/^ *"version": *"//p' package.json | tr -d '"' | tr -d ',' | tr -d '[[:space:]]')
echo "packageVersion=${PACKAGE_VERSION}" >> $GITHUB_ENV
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- run: npm i -g titanium
name: Install Titanium CLI
- name: Cache SDK
id: titanium-cache
uses: actions/cache@v2
with:
path: ~/.titanium/mobilesdk/linux/${{ env.SDK_VERSION }}
key: ${{ runner.os }}-titanium-sdk-${{ env.SDK_VERSION }}
restore-keys: |
${{ runner.os }}-titanium-sdk-
- run: ti sdk install ${{ env.SDK_VERSION }} --force
name: Install SDK
if: steps.titanium-cache.outputs.cache-hit != 'true'
- name: Build and Test Hook
working-directory: ./android/hooks
run: |
sed -i.bak 's/0.0.0-PLACEHOLDER/${{ env.packageVersion }}/g' ./package.json
rm -rf package.json.bak
npm ci
npm test
rm -rf node_modules
rm -rf coverage
rm -f junit_report.xml
rm -rf test
npm ci --production
rm -f package-lock.json
- name: Build Module
working-directory: ./android
run: |
sed -i.bak 's/VERSION/${{ env.packageVersion }}/g' ./manifest
rm -rf ../example
rm -rf ../documentation
ti build -p android --build-only
- name: Archive Android zip
uses: actions/upload-artifact@v2
with:
name: hyperloop-android-${{ env.packageVersion }}
if-no-files-found: error
path: |
android/dist/hyperloop-android-*.zip
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties