-
Notifications
You must be signed in to change notification settings - Fork 125
107 lines (102 loc) · 6.4 KB
/
DEPLOY.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: DEPLOY
on:
push:
tags:
- 'v*'
env:
CI: true
FORCED_VERSION: ${{ github.ref }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPEUSERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPEPASSWORD }}
JAVA_VERSION: 11
JAVA_DISTRIBUTION: zulu
jobs:
create-staging-repo:
runs-on: ubuntu-latest
outputs:
stagedRepositoryId: ${{ steps.createStagedRepositoryId.outputs.stagedRepositoryId }}
env:
DISABLE_JAVASCRIPT_TEST: true
DISABLE_KOTLIN_NATIVE: true
DISABLE_ANDROID: true
DISABLE_SANDBOX: true
steps:
- uses: actions/checkout@v1
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } }
- { name: Replace gradle wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" }
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0
- run: sudo apt-get install xvfb
- id: createStagedRepositoryId
run: xvfb-run --auto-servernum ./gradlew --no-daemon --info --stacktrace startReleasingMavenCentral
publish-ios:
runs-on: macos-11
needs: [create-staging-repo]
env:
stagedRepositoryId: ${{needs.create-staging-repo.outputs.stagedRepositoryId}}
steps:
- uses: actions/checkout@v1
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } }
- { name: Replace gradle wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" }
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0
- run: ./gradlew checkReleasingMavenCentral
- run: ./gradlew publishIosArm64PublicationToMavenRepository publishIosX64PublicationToMavenRepository publishIosSimulatorArm64PublicationToMavenRepository
env:
DISABLE_JAVASCRIPT_TEST: true
publish-tvos:
runs-on: macos-11
needs: [create-staging-repo]
env:
stagedRepositoryId: ${{needs.create-staging-repo.outputs.stagedRepositoryId}}
steps:
- uses: actions/checkout@v1
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } }
- { name: Replace gradle wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" }
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0
- run: ./gradlew checkReleasingMavenCentral
- run: ./gradlew publishTvosX64PublicationToMavenRepository publishTvosArm64PublicationToMavenRepository publishTvosSimulatorArm64PublicationToMavenRepository
env:
DISABLE_JAVASCRIPT_TEST: true
publish-jvm-multiplatform:
runs-on: ubuntu-latest
needs: [create-staging-repo]
env:
stagedRepositoryId: ${{needs.create-staging-repo.outputs.stagedRepositoryId}}
steps:
- uses: actions/checkout@v1
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } }
- { name: Replace gradle wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" }
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0
- run: sudo apt-get install xvfb
- run: xvfb-run --auto-servernum ./gradlew --no-daemon checkReleasingMavenCentral
- run: xvfb-run --auto-servernum ./gradlew --no-daemon publishKotlinMultiplatformPublicationToMavenRepository publishJvmPublicationToMavenRepository
publish-js-android:
runs-on: ubuntu-latest
needs: [create-staging-repo]
env:
stagedRepositoryId: ${{needs.create-staging-repo.outputs.stagedRepositoryId}}
steps:
- uses: actions/checkout@v1
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } }
- { name: Replace gradle wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" }
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0
- run: sudo apt-get install xvfb
- run: xvfb-run --auto-servernum ./gradlew --no-daemon checkReleasingMavenCentral
#- run: xvfb-run --auto-servernum ./gradlew --no-daemon publishWasmJsPublicationToMavenRepository
- run: xvfb-run --auto-servernum ./gradlew --no-daemon publishJsPublicationToMavenRepository publishAndroidPublicationToMavenRepository
publish-finalize:
runs-on: ubuntu-latest
needs: [publish-ios, publish-jvm-multiplatform, publish-js-android, publish-tvos]
env:
stagedRepositoryId: ${{needs.create-staging-repo.outputs.stagedRepositoryId}}
DISABLE_JAVASCRIPT_TEST: true
DISABLE_KOTLIN_NATIVE: true
DISABLE_ANDROID: true
DISABLE_SANDBOX: true
steps:
- uses: actions/checkout@v1
- { name: Set up JDK, uses: actions/setup-java@v3, with: { distribution: "${{ env.JAVA_DISTRIBUTION }}", java-version: "${{ env.JAVA_VERSION }}" } }
- { name: Replace gradle wrapper, run: "sed 's/-all/-bin/g' gradle/wrapper/gradle-wrapper.properties > gradle/wrapper/gradle-wrapper.properties.bak; cp gradle/wrapper/gradle-wrapper.properties.bak gradle/wrapper/gradle-wrapper.properties" }
- { name: Prepare Gradle, uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc } # v2.8.0
- run: ./gradlew releaseMavenCentral