Skip to content

Commit

Permalink
Add Github Actions
Browse files Browse the repository at this point in the history
DeVoresyah committed Mar 17, 2021
1 parent 32a9af3 commit 9507925
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Github Actions

on:
push:
branches: [ main ]

workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
container: reactnativecommunity/react-native-android
steps:
- uses: actions/checkout@v2

- name: Envinfo
run: npx envinfo

- name: Install Modules
run: |
yarn install
npx jetify
- name: Build App
run: |
cd android
chmod +x gradlew
./gradlew assembleRelease
- name: Slack Success Notif
if: success()
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: money-expenses
status: SUCCESS
color: good

- name: Slack Failed Notif
if: failure()
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: money-expenses
status: FAILED
color: danger

- name: Send App to Slack
if: success()
env:
ARM64_V8A: ${{ secrets.ARM64_V8A }}
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
run: |
curl -v -F file=@${ARM64_V8A} -F channels=${CHANNEL_ID} -F token=${SLACK_TOKEN} https://slack.com/api/files.upload

0 comments on commit 9507925

Please sign in to comment.