Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #151 from ito-org/fix-android-pipeline
Browse files Browse the repository at this point in the history
Fix android pipeline
  • Loading branch information
haveyaseen authored Apr 25, 2020
2 parents be8b9f3 + 7906a7d commit 96d25ab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 58 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/android-feature.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Android Pull Request & Master CI
name: Android

env:
ANDROID_COMPILE_SDK: '28'
Expand All @@ -16,19 +16,14 @@ on:
pull_request:
branches:
- master
paths-ignore:
- '.github/**'
paths-ignore:
- '**.md'
- 'LICENSE'
push:
tags:
- v*
- '*-android'
branches:
- master
paths-ignore:
- '.github/**'
- '**.md'
- 'LICENSE'

jobs:
build:
Expand All @@ -44,15 +39,18 @@ jobs:
java-package: jdk
- name: Install Android SDK
run: sh ci/install-android-sdk.sh
- uses: bahmutov/npm-install@v1
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Build APK
run: npm run android:build-apk
# Tests currently disabled because of broken test setup
# - name: Run tests
# run: npm run test
- name: Archive APK
uses: actions/upload-artifact@v1
with:
name: app-release.apk
path: ${{ env.ANDROID_APK_FILE }}

deploy:
name: Deploy APK as release
needs: build
Expand All @@ -78,8 +76,7 @@ jobs:
Changes in this Release:
draft: true
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
- name: Upload release asset with version number in filename
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -88,3 +85,12 @@ jobs:
asset_path: ./app-release.apk
asset_name: ito-app-${{ steps.get_version.outputs.VERSION }}.apk
asset_content_type: application/zip
- name: Upload release asset with static name (linked from homepage)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./app-release.apk
asset_name: ito-app.apk
asset_content_type: application/zip
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ The CI pipeline is implemented using GitHub Actions.

### Android

- Build (runs on every push):
- Build (pull requests against `master`, `master` pushes, `*-android` tag pushes):
- install the Android SDK
- build an APK
- Deploy (runs only on git tags):
- Deploy (`master` pushes, `*-android` tag pushes):
- create a [GitHub release](https://github.com/ito-org/react-native-app/releases)
- Upload the APK as release asset

Expand Down

0 comments on commit 96d25ab

Please sign in to comment.