Create Maintainers.md
#34
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
name: iroha-java CI | |
on: | |
push: | |
env: | |
BUILD_DIR: client/build | |
jobs: | |
Linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
library: | |
- client | |
- testcontainers | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Build with Gradle | |
run: | | |
./gradlew --daemon | |
./gradlew build --parallel --build-cache | |
./gradlew jacocoTestReport | |
- name: Cleanup Gradle Cache | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties | |
- name: Codecov | |
uses: codecov/[email protected] | |
- name: Sonar | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
BRANCH_NAME: ${{ github.ref }} | |
run: if [[ -n $SONAR_TOKEN ]]; then ./housekeeping/sonar.sh; else echo "Some secret undefined. Step passed..."; fi | |
- name: Publish lib to nexus for branch | |
if: ${{ github.ref == 'refs/heads/main' }} | |
uses: sonatype-nexus-community/nexus-repo-github-action@master | |
with: | |
serverUrl: https://nexus.iroha.tech/ | |
username: '${{ secrets.NEXUS_USER }}' | |
password: '${{ secrets.NEXUS_PASS }}' | |
format: maven2 | |
repository: maven-soramitsu | |
coordinates: groupId=jp.co.soramitsu.iroha-java artifactId=${{ matrix.library }} version=${{ github.sha }} | |
assets: extension=jar | |
filename: /${{ matrix.library }}/build/libs/*.jar | |
- name: Publish lib to nexus for tag | |
if: ${{ github.ref_type == 'tag' }} | |
uses: sonatype-nexus-community/nexus-repo-github-action@master | |
with: | |
serverUrl: https://nexus.iroha.tech/ | |
username: '${{ secrets.NEXUS_USER }}' | |
password: '${{ secrets.NEXUS_PASS }}' | |
format: maven2 | |
repository: maven-soramitsu | |
coordinates: groupId=jp.co.soramitsu.iroha-java artifactId=${{ matrix.library }} version=${{ github.ref_name }} | |
assets: extension=jar | |
filename: /${{ matrix.library }}/build/libs/*.jar | |