diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5327dc1..117f00e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,11 +5,19 @@ on: types: [published] jobs: + unit-tests: + uses: kosi-libs/kodein-internal-github-actions/.github/workflows/unit-tests.yml@main + instrumentation-tests: + uses: kosi-libs/kodein-internal-github-actions/.github/workflows/check-with-android.yml@main + create-staging-repository: + needs: + - unit-tests + - instrumentation-tests uses: kosi-libs/kodein-internal-github-actions/.github/workflows/create-nexus-staging-repository.yml@main secrets: inherit - build-upload: + upload-release: needs: create-staging-repository runs-on: macOS-latest env: @@ -20,14 +28,12 @@ jobs: steps: - name: Setup uses: kosi-libs/kodein-internal-github-actions/setup@main - - name: Check with Android - uses: kosi-libs/kodein-internal-github-actions/checkWithAndroid@main - name: Upload run: ./gradlew publishAllPublicationsToOssrhStagingRepository -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository-id }} shell: bash drop-or-release-staging-repository: - needs: [create-staging-repository, build-upload] + needs: [create-staging-repository, upload] if: ${{ always() && needs.create-staging-repository.result == 'success' }} uses: kosi-libs/kodein-internal-github-actions/.github/workflows/drop-or-release-nexus-staging-repository.yml@main secrets: inherit diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 70c6221..086ef11 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -15,25 +15,11 @@ on: jobs: unit-tests: - name: Unit tests - runs-on: macOS-latest - steps: - - name: Setup - uses: kosi-libs/kodein-internal-github-actions/setup@main - - name: Check - run: ./gradlew check - shell: bash - + uses: kosi-libs/kodein-internal-github-actions/.github/workflows/unit-tests.yml@main instrumentation-tests: - name: Instrumentation tests - runs-on: ubuntu-latest - steps: - - name: Setup - uses: kosi-libs/kodein-internal-github-actions/setup@main - - name: Check with Android - uses: kosi-libs/kodein-internal-github-actions/checkWithAndroid@main + uses: kosi-libs/kodein-internal-github-actions/.github/workflows/check-with-android.yml@main - upload: + upload-snapshot: needs: - unit-tests - instrumentation-tests @@ -44,8 +30,6 @@ jobs: steps: - name: Setup uses: kosi-libs/kodein-internal-github-actions/setup@main - - name: Gradle cache - uses: gradle/gradle-build-action@v3 - name: Upload run: ./gradlew publishAllPublicationsToOssrhStagingRepository -PgitRef=${{ github.ref }} -Psnapshot=true shell: bash diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b465b5..b47962d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,8 +10,19 @@ on: - '!./github/workflow/test.yml' jobs: - check: + unit-tests: + name: Unit tests runs-on: macOS-latest + steps: + - name: Setup + uses: kosi-libs/kodein-internal-github-actions/setup@main + - name: Check + run: ./gradlew check + shell: bash + + instrumentation-tests: + name: Instrumentation tests + runs-on: ubuntu-latest steps: - name: Setup uses: kosi-libs/kodein-internal-github-actions/setup@main