Skip to content

Commit

Permalink
[#2] chore - create CD/CI workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Banci <guibanci@gmail.com>
  • Loading branch information
gdeusdara committed Sep 14, 2021
1 parent 20c26b5 commit 1fd5de9
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/cd.yml
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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
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

0 comments on commit 1fd5de9

Please sign in to comment.