forked from wouterds/react-native-tv-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
47 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,58 @@ | ||
name: code-review | ||
name: Build Android .apk | ||
|
||
run-name: "Building the .apk with the tag triggered by @${{ github.actor }}" | ||
|
||
on: | ||
push: | ||
branches: ['**'] | ||
workflow_call: | ||
workflow_call: | ||
|
||
jobs: | ||
linting: | ||
build: | ||
runs-on: ubuntu-latest | ||
# runs-on: ubuntu-22.04 # this is the Ubuntu version that this was created on | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- run: yarn --frozen-lockfile | ||
- run: yarn lint | ||
java-version: "11" | ||
distribution: "adopt" | ||
cache: "gradle" | ||
|
||
typescript: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
# Node, Yarn and NPM | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Run Yarn Install | ||
run: yarn install | ||
|
||
- name: Build application | ||
run: yarn release | ||
|
||
- name: List the .apks compiled | ||
run: ls ./android/app/build/outputs/apk/release/ -hal | ||
|
||
- name: Rename the .apk to the tag version | ||
run: mv ./android/app/build/outputs/apk/release/app-universal-release.apk ./android/app/build/outputs/apk/release/app_name_${{ github.ref_name }}.apk | ||
|
||
|
||
# Creating and Uploading the releases | ||
- name: Create Release and Uploading Files | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- run: yarn --frozen-lockfile | ||
- run: yarn lint:ts | ||
files: | | ||
android/app/build/outputs/apk/release/app-arm64-v8a-release.apk | ||
android/app/build/outputs/apk/release/app-armeabi-v7a-release.apk | ||
android/app/build/outputs/apk/release/app-x86_64-release.apk | ||
android/app/build/outputs/apk/release/app-x86-release.apk | ||
android/app/build/outputs/apk/release/app_name_${{ github.ref_name }}.apk |