Skip to content

Release/0.7.1

Release/0.7.1 #55

Workflow file for this run

name: Pull request
on:
pull_request:
branches:
- main
- release/*
env:
OSSH_USERNAME: ${{ secrets.OSSH_USERNAME }}
OSSH_PASSWORD: ${{ secrets.OSSH_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASS }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
jobs:
build-library:
#if: github.event_name == 'pull_request' && github.event.action == 'opened' && startsWith(github.event.pull_request.head.ref, 'sample/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/master' && github.ref !=
'refs/heads/develop' }}
- name: Cache .konan
uses: actions/cache@v2
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', 'gradle/**/*') }}
restore-keys: |
${{ runner.os }}-konan-
- name: Replace keys
run: |
AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY=${{ secrets.AWS_SECRET_KEY }}
AWS_ACCESS_KEY_SCAPE=$(echo "$AWS_ACCESS_KEY" | sed 's/[\&/]/\\&/g')
AWS_SECRET_KEY_SCAPE=$(echo "$AWS_SECRET_KEY" | sed 's/[\&/]/\\&/g')
sed -i -e "s/private val accessKey = .*/private val accessKey = \"$AWS_ACCESS_KEY_SCAPE\"/" -e "s/private val secretKey = .*/private val secretKey = \"$AWS_SECRET_KEY_SCAPE\"/" aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
sed -i -e "s/private val accessKey = .*/private val accessKey = \"$AWS_ACCESS_KEY_SCAPE\"/" -e "s/private val secretKey = .*/private val secretKey = \"$AWS_SECRET_KEY_SCAPE\"/" aws-dynamo/src/commonTest/kotlin/com/estivensh4/dynamo/AWSDynamoTest.kt
cat aws-s3/src/commonTest/kotlin/com/estivensh4/s3/AWSS3CommonTest.kt
working-directory: ${{ github.workspace }}/
- name: Check
run: ./local-check.sh
- name: Library local publish
run: ./gradlew publishToMavenLocal
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: maven
path: ~/.m2/repository/io/github/estivensh4
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
if: ${{ always() }}
with:
report_paths: "**/build/test-results/**/TEST-*.xml"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive reports
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: code-coverage-report-${{ github.job }}
path: "**/build/reports/**/*"
check-sample-android-app:
#if: github.event_name == 'pull_request' && github.event.action == 'opened' && startsWith(github.event.pull_request.head.ref, 'sample/')
needs: build-library
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: androidApp
uses: ./.github/template/deploy
with:
target: androidapp
githubToken: ${{ secrets.GITHUB_TOKEN }}
check-sample-desktop-app:
#if: github.event_name == 'pull_request' && github.event.action == 'opened' && startsWith(github.event.pull_request.head.ref, 'sample/')
needs: build-library
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: desktopApp
uses: ./.github/template/deploy
with:
target: desktopApp
githubToken: ${{ secrets.GITHUB_TOKEN }}
check-sample-wear-app:
#if: github.event_name == 'pull_request' && github.event.action == 'opened' && startsWith(github.event.pull_request.head.ref, 'sample/')
needs: build-library
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: wearApp
uses: ./.github/template/deploy
with:
target: wearapp
githubToken: ${{ secrets.GITHUB_TOKEN }}
check-sample-web-app:
# if: github.event_name == 'pull_request' && github.event.action == 'opened' && startsWith(github.event.pull_request.head.ref, 'sample/')
needs: build-library
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: webApp
uses: ./.github/template/deploy
with:
target: webApp
githubToken: ${{ secrets.GITHUB_TOKEN }}