-
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.
Signed-off-by: Guilherme Banci <guibanci@gmail.com>
- Loading branch information
Showing
2 changed files
with
83 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: CD Production | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- feature/2-cd/ci | ||
jobs: | ||
test: | ||
name: CI Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Modules | ||
run: npm ci | ||
- name: Run Tests | ||
run: npm run test | ||
|
||
build: | ||
name: CD Build Android | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build container | ||
run: | | ||
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
npm ci | ||
cd ./android | ||
./gradlew assembleRelease --warning-mode=all | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: apk | ||
path: ./android/app/build/outputs/apk/release/app-release.apk | ||
|
||
tagged-release: | ||
name: "Tagged Release" | ||
needs: build | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Downlaod APK File | ||
uses: actions/download-artifact@master | ||
with: | ||
name: apk | ||
path: ./ | ||
- name: Add Github Release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: false | ||
files: | | ||
*.apk | ||
LICENSE |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# name: CI - Lint, Test, Build | ||
|
||
# on: | ||
# push: | ||
# pull_request: | ||
|
||
# jobs: | ||
# lint: | ||
# name: CI Lint | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Install Modules | ||
# run: npm ci | ||
# - name: ESLint | ||
# env: | ||
# CI: true | ||
# run: npm run lint | ||
|
||
# test: | ||
# name: CI Tests | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Install Modules | ||
# run: npm ci | ||
# - name: Run Tests | ||
# run: npm run test |