Skip to content

Commit 561e161

Browse files
author
Ondřej Kalman
authored
Merge pull request #102 from thefuntasty/feature/2.x-github-actions
Feat: added github actions for 2.x branch
2 parents 7ef8e26 + 9070262 commit 561e161

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed

.github/workflows/pull_request.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Check PR
2+
on: [pull_request]
3+
4+
jobs:
5+
pr:
6+
name: PR check
7+
runs-on: [ubuntu-latest]
8+
env:
9+
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-ruby@v1
13+
with:
14+
ruby-version: '2.6'
15+
- name: set up JDK 1.8
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 1.8
19+
- name: Run LintCheck
20+
shell: bash
21+
run: ./gradlew detekt ktlintCheck assembleRelease
22+
- name: Run unit tests
23+
shell: bash
24+
run: ./gradlew --continue testRelease
25+
- name: Danger action
26+
uses: MeilCli/danger-action@v2
27+
continue-on-error: true
28+
with:
29+
plugins_file: 'Gemfile'
30+
danger_file: 'Dangerfile'
31+
danger_id: 'danger-pr'

.github/workflows/push_master.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Check 2.x
2+
on:
3+
push:
4+
branches:
5+
- 2.x
6+
7+
jobs:
8+
master:
9+
name: 2.x check
10+
runs-on: [ubuntu-latest]
11+
env:
12+
SLACK_CHANNEL: android
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: set up JDK 1.8
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 1.8
19+
- name: Run LintCheck
20+
shell: bash
21+
run: ./gradlew detekt ktlintCheck assembleRelease
22+
- name: Run unit tests
23+
shell: bash
24+
run: ./gradlew --continue testRelease
25+
- name: Slack Notification
26+
if: failure()
27+
uses: homoluctus/slatify@master
28+
with:
29+
type: "failure"
30+
job_name: '*2.x Check*'
31+
username: GitHub
32+
channel: ${{env.SLACK_CHANNEL}}
33+
url: ${{ secrets.SLACK_WEB_HOOK }}
34+
commit: true
35+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release build
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
name: Release build
10+
runs-on: [ubuntu-latest]
11+
env:
12+
EXCLUDE_APK_FILTER: .*unaligned.apk\|.*Test.*.apk
13+
BITRISE_GIT_TAG: ${{github.event.release.name}}
14+
steps:
15+
- uses: actions/checkout@v1
16+
- uses: actions/setup-ruby@v1
17+
with:
18+
ruby-version: '2.6'
19+
- name: Set up JDK 1.8
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 1.8
23+
- name: Run unit tests
24+
shell: bash
25+
run: ./gradlew --continue testRelease
26+
- name: Upload to Bintray
27+
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}}
28+
- name: Publish plugins
29+
run: ./gradlew publishPlugins -Pgradle.publish.key=${{secrets.GRADLE_PUBLISH_KEY}} -Pgradle.publish.secret=${{secrets.GRADLE_PUBLISH_SECRET}}

0 commit comments

Comments
 (0)