Skip to content

Commit

Permalink
Setup PR check and release Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matejsemancik committed Jan 16, 2020
1 parent beaa895 commit c42fccb
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pull_request.yml
@@ -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 Lint Check
shell: bash
run: ./gradlew lintCheck
- 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'
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,24 @@
name: Release build

on:
release:
types: [published]

jobs:
release:
name: Release build
runs-on: [ubuntu-latest]
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}}
5 changes: 5 additions & 0 deletions Gemfile
@@ -0,0 +1,5 @@
source 'https://rubygems.org';
gem 'thefuntasty_danger';
gem 'danger-checkstyle_format';
gem 'danger-android_lint';
gem 'danger-junit'

0 comments on commit c42fccb

Please sign in to comment.