Skip to content

Commit

Permalink
CI with Github action
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesa2 committed Apr 17, 2022
1 parent 5a8e022 commit e8011c3
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/changelog-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"categories": [
{
"title": "## 💡 Features",
"labels": [
"feature",
"enhancement"
]
},
{
"title": "## 🐛 Fixes",
"labels": [
"fix",
"bug"
]
},
{
"title": "## 💬 Maintenance",
"labels": [
"maintenance"
]
}
],
"ignore_labels": [
"dependencies",
"gradle-wrapper"
],
"sort": "ASC",
"template": "${{CHANGELOG}}",
"pr_template": "- ${{TITLE}} #${{NUMBER}}",
"empty_template": "- no changes"
}
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
52 changes: 52 additions & 0 deletions .github/workflows/Android-CI-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build:
name: Publish release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@main
with:
configuration: ".github/changelog-configuration.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get the version
id: tagger
uses: jimschubert/query-tag-action@v2
with:
skip-unshallow: 'true'
abbrev: false
commit-ish: HEAD
- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.2
- name: Build project
run: ./gradlew assembleRelease
env:
VERSION: ${{steps.tagger.outputs.tag}}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{steps.tagger.outputs.tag}}
prerelease: ${{steps.tagger.outputs.tag}} == *"alpha"* || ${{steps.tagger.outputs.tag}} == *"beta"*
name: ${{steps.tagger.outputs.tag}}
body: ${{steps.github_release.outputs.changelog}}
files: |
./libStream/build/outputs/aar/libStream*.aar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/Android-CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
BuildTest:
name: Build and test JDK ${{ matrix.java_version }}
runs-on: macOS-latest
strategy:
matrix:
java_version: [11]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java_version }}
- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.2
- name: Build project
run: ./gradlew assembleDebug
- name: gradle check
run: ./gradlew check
- name: Archive Lint report
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: Logcat-Lint-report
path: sample/build/reports/lint-results.html
17 changes: 17 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Validate Gradle Wrapper"

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
18 changes: 18 additions & 0 deletions .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Update Gradle Wrapper

on:
schedule:
- cron: "0 6 * * MON"

jobs:
update-gradle-wrapper:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
set-distribution-checksum: false

0 comments on commit e8011c3

Please sign in to comment.