Skip to content

Commit

Permalink
Merge pull request #102 from thefuntasty/feature/2.x-github-actions
Browse files Browse the repository at this point in the history
Feat: added github actions for 2.x branch
  • Loading branch information
Ondřej Kalman authored Jan 15, 2020
2 parents 7ef8e26 + 9070262 commit 561e161
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check PR
on: [pull_request]

jobs:
pr:
name: PR check
runs-on: [ubuntu-latest]
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run LintCheck
shell: bash
run: ./gradlew detekt ktlintCheck assembleRelease
- name: Run unit tests
shell: bash
run: ./gradlew --continue testRelease
- name: Danger action
uses: MeilCli/danger-action@v2
continue-on-error: true
with:
plugins_file: 'Gemfile'
danger_file: 'Dangerfile'
danger_id: 'danger-pr'
35 changes: 35 additions & 0 deletions .github/workflows/push_master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check 2.x
on:
push:
branches:
- 2.x

jobs:
master:
name: 2.x check
runs-on: [ubuntu-latest]
env:
SLACK_CHANNEL: android
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run LintCheck
shell: bash
run: ./gradlew detekt ktlintCheck assembleRelease
- name: Run unit tests
shell: bash
run: ./gradlew --continue testRelease
- name: Slack Notification
if: failure()
uses: homoluctus/slatify@master
with:
type: "failure"
job_name: '*2.x Check*'
username: GitHub
channel: ${{env.SLACK_CHANNEL}}
url: ${{ secrets.SLACK_WEB_HOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release build

on:
release:
types: [published]

jobs:
release:
name: Release build
runs-on: [ubuntu-latest]
env:
EXCLUDE_APK_FILTER: .*unaligned.apk\|.*Test.*.apk
BITRISE_GIT_TAG: ${{github.event.release.name}}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run unit tests
shell: bash
run: ./gradlew --continue testRelease
- name: Upload to Bintray
run: ./gradlew build publish bintrayUpload --stacktrace --no-daemon -PBINTRAY_USER=${{secrets.BINTRAY_USER}} -PBINTRAY_KEY=${{secrets.BINTRAY_KEY}} -PBINTRAY_GPG_KEY=${{secrets.BINTRAY_GPG_KEY}}
- name: Publish plugins
run: ./gradlew publishPlugins -Pgradle.publish.key=${{secrets.GRADLE_PUBLISH_KEY}} -Pgradle.publish.secret=${{secrets.GRADLE_PUBLISH_SECRET}}

0 comments on commit 561e161

Please sign in to comment.