-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from thefuntasty/feature/2.x-github-actions
Feat: added github actions for 2.x branch
- Loading branch information
Showing
3 changed files
with
95 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,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' |
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,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 }} |
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,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}} |