6
6
7
7
jobs :
8
8
create-staging-repository :
9
- name : Create staging repository
10
- runs-on : ubuntu-latest
11
- outputs :
12
- repository_id : ${{ steps.create.outputs.repository_id }}
13
- steps :
14
- - id : create
15
- uses : nexus-actions/create-nexus-staging-repo@990063f02160c633c168037b8b3e8585c76469fe # v1.3
16
- with :
17
- base_url : https://s01.oss.sonatype.org/service/local/
18
- username : ${{ secrets.SONATYPE_USERNAME }}
19
- password : ${{ secrets.SONATYPE_PASSWORD }}
20
- staging_profile_id : ${{ secrets.SONATYPE_PROFILE_ID }}
21
- description : ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }}
9
+ uses : kosi-libs/kodein-internal-github-actions/.github/workflows/create-nexus-staging-repository.yml@main
10
+ secrets : inherit
22
11
23
12
build-upload :
24
13
needs : create-staging-repository
@@ -29,53 +18,19 @@ jobs:
29
18
GPG_PRIVATE_KEY : ${{ secrets.PGP_SIGNING_KEY }}
30
19
GPG_PRIVATE_PASSWORD : ${{ secrets.PGP_SIGNING_PASSWORD }}
31
20
steps :
32
- - name : Checkout
33
- uses : actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3
34
- - name : Cached Konan
35
- uses : actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3
36
- with :
37
- path : ~/.konan
38
- key : ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
39
- restore-keys : ${{ runner.os }}-konan-
40
- - name : Cached Gradle
41
- uses : gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # v2
42
- - name : Set up JDK 17
43
- uses : actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # v3
44
- with :
45
- java-version : 17
46
- distribution : ' temurin'
47
- - name : Check
48
- run : ./gradlew hostOnlyTest
49
- shell : bash
50
- - name : Check Android
51
- uses : reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2.28.0
52
- with :
53
- api-level : 29
54
- ndk : 21.3.6528147
55
- cmake : 3.10.2.4988404
56
- script : ./gradlew connectedCheck
21
+ - name : Setup
22
+ uses : kosi-libs/kodein-internal-github-actions/setup@main
23
+ - name : Check with Android
24
+ uses : kosi-libs/kodein-internal-github-actions/checkWithAndroid@main
57
25
- name : Upload
58
26
run : ./gradlew publishAllPublicationsToOssrhStagingRepository -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository-id }}
59
27
shell : bash
60
28
61
- drop-or-release :
29
+ drop-or-release-staging-repository :
62
30
needs : [create-staging-repository, build-upload]
63
- runs-on : ubuntu-latest
64
31
if : ${{ always() && needs.create-staging-repository.result == 'success' }}
65
- steps :
66
- - name : Discard
67
- if : ${{ needs.build-upload.result != 'success' }}
68
- uses : nexus-actions/drop-nexus-staging-repo@v1
69
- with :
70
- base_url : https://s01.oss.sonatype.org/service/local/
71
- username : ${{ secrets.SONATYPE_USERNAME }}
72
- password : ${{ secrets.SONATYPE_PASSWORD }}
73
- staging_repository_id : ${{ needs.create-staging-repository.outputs.repository_id }}
74
- - name : Release
75
- if : ${{ needs.build-upload.result == 'success' }}
76
- uses : nexus-actions/release-nexus-staging-repo@v1
77
- with :
78
- base_url : https://s01.oss.sonatype.org/service/local/
79
- username : ${{ secrets.SONATYPE_USERNAME }}
80
- password : ${{ secrets.SONATYPE_PASSWORD }}
81
- staging_repository_id : ${{ needs.create-staging-repository.outputs.repository_id }}
32
+ uses : kosi-libs/kodein-internal-github-actions/.github/workflows/drop-or-release-nexus-staging-repository.yml@main
33
+ secrets : inherit
34
+ with :
35
+ repository-id : ${{ needs.create-staging-repository.outputs.repository-id }}
36
+ build-upload-result : ${{ needs.build-upload.result }}
0 commit comments