Skip to content

Commit 42a8228

Browse files
committed
ci: upgrade actions
1 parent 07ae841 commit 42a8228

File tree

3 files changed

+20
-100
lines changed

3 files changed

+20
-100
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,8 @@ on:
66

77
jobs:
88
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
2211

2312
build-upload:
2413
needs: create-staging-repository
@@ -29,53 +18,19 @@ jobs:
2918
GPG_PRIVATE_KEY: ${{ secrets.PGP_SIGNING_KEY }}
3019
GPG_PRIVATE_PASSWORD: ${{ secrets.PGP_SIGNING_PASSWORD }}
3120
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
5725
- name: Upload
5826
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -Porg.kodein.sonatype.repositoryId=${{ needs.create-staging-repository.outputs.repository-id }}
5927
shell: bash
6028

61-
drop-or-release:
29+
drop-or-release-staging-repository:
6230
needs: [create-staging-repository, build-upload]
63-
runs-on: ubuntu-latest
6431
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 }}

.github/workflows/snapshot.yml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,10 @@ jobs:
2121
build-upload:
2222
runs-on: macOS-latest
2323
steps:
24-
- name: Checkout
25-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3
26-
- name: Cached Konan
27-
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 #v3
28-
with:
29-
path: ~/.konan
30-
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
31-
restore-keys: ${{ runner.os }}-konan-
32-
- name: Cached Gradle
33-
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 #v2
34-
- name: Set up JDK 17
35-
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc #v3
36-
with:
37-
java-version: 17
38-
distribution: 'temurin'
39-
- name: Check
40-
run: ./gradlew check
41-
shell: bash
42-
- name: Check Android
43-
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
44-
with:
45-
api-level: 29
46-
ndk: 21.3.6528147
47-
cmake: 3.10.2.4988404
48-
script: ./gradlew connectedCheck
24+
- name: Setup
25+
uses: kosi-libs/kodein-internal-github-actions/setup@main
26+
- name: Check with Android
27+
uses: kosi-libs/kodein-internal-github-actions/checkWithAndroid@main
4928
- name: Upload
5029
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -PgitRef=${{ github.ref }} -Psnapshot=true
5130
shell: bash

.github/workflows/test.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,7 @@ jobs:
1313
check:
1414
runs-on: macOS-latest
1515
steps:
16-
- name: Checkout
17-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3
18-
- name: Cached Konan
19-
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 #v3
20-
with:
21-
path: ~/.konan
22-
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
23-
restore-keys: ${{ runner.os }}-konan-
24-
- name: Cached Gradle
25-
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 #v2
26-
- name: Set up JDK 17
27-
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc #v3
28-
with:
29-
java-version: 17
30-
distribution: 'temurin'
31-
- name: Check
32-
run: ./gradlew check
33-
shell: bash
16+
- name: Setup
17+
uses: kosi-libs/kodein-internal-github-actions/setup@main
18+
- name: Check with Android
19+
uses: kosi-libs/kodein-internal-github-actions/checkWithAndroid@main

0 commit comments

Comments
 (0)