-
Notifications
You must be signed in to change notification settings - Fork 10
91 lines (85 loc) · 3.71 KB
/
push_dev.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
# On pushes to main, run tests on all supported platforms. If all tests pass, then publish release artifacts and
# update Orchid documentation site.
name: 'Push to `dev` (Check Dev Branches)'
on:
push:
branches: ['dev']
env:
GITHUB_ACTOR: '${{ github.actor }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
OSSRH_USERNAME: '${{ secrets.OSSRH_USERNAME }}'
OSSRH_PASSWORD: '${{ secrets.OSSRH_PASSWORD }}'
STAGING_PROFILE_ID: '${{ secrets.STAGING_PROFILE_ID }}'
SIGNING_KEY_ID: '${{ secrets.SIGNING_KEY_ID }}'
SIGNING_KEY: '${{ secrets.SIGNING_KEY }}'
SIGNING_PASSWORD: '${{ secrets.SIGNING_PASSWORD }}'
JB_SIGNING_KEY: '${{ secrets.JB_SIGNING_KEY }}'
JB_CHAIN: '${{ secrets.JB_CHAIN }}'
JB_PASSPHRASE: '${{ secrets.JB_PASSPHRASE }}'
JB_MARKETPLACE_TOKEN: '${{ secrets.JB_MARKETPLACE_TOKEN }}'
jobs:
ktlintCheck:
name: 'KtlintCheck on macos-latst'
runs-on: 'macos-latest'
steps:
- uses: 'actions/checkout@v3'
with:
submodules: 'recursive'
fetch-depth: 0 # all commit history and tags
- name: 'Set up JDK ${{ matrix.java }}'
uses: 'actions/setup-java@v2'
with:
distribution: 'temurin'
java-version: '17'
- name: 'Run checks with Gradle'
run: './gradlew ktlintCheck --no-daemon --stacktrace'
unitTest:
needs: ['ktlintCheck']
strategy:
matrix:
config:
- { target: 'testDebugUnitTest', os: 'ubuntu-latest', java: 17 }
- { target: 'testReleaseUnitTest', os: 'ubuntu-latest', java: 17 }
- { target: 'iosSimulatorArm64Test', os: 'macos-latest', java: 17 }
- { target: 'iosX64Test', os: 'macos-latest', java: 17 }
- { target: 'jsTest', os: 'ubuntu-latest', java: 17 }
- { target: 'jvmTest', os: 'ubuntu-latest', java: 17 }
- { target: 'wasmJsTest', os: 'ubuntu-latest', java: 17 }
name: 'Run ${{ matrix.config.target }} on ${{ matrix.config.os }} JDK ${{ matrix.config.java }}'
runs-on: '${{ matrix.config.os }}'
steps:
- uses: 'actions/checkout@v3'
with:
submodules: 'recursive'
fetch-depth: 0 # all commit history and tags
- uses: 'actions/setup-java@v2'
with:
distribution: 'temurin'
java-version: ${{ matrix.config.java }}
- run: './gradlew ${{ matrix.config.target }} --stacktrace'
publishSnapshotArtifacts:
needs: ['unitTest']
strategy:
matrix:
config:
- { target: 'AndroidDebug', os: 'ubuntu-latest', java: 17 }
- { target: 'AndroidRelease', os: 'ubuntu-latest', java: 17 }
- { target: 'IosArm64', os: 'macos-latest', java: 17 }
- { target: 'IosSimulatorArm64', os: 'macos-latest', java: 17 }
- { target: 'IosX64', os: 'macos-latest', java: 17 }
- { target: 'Js', os: 'ubuntu-latest', java: 17 }
- { target: 'Jvm', os: 'ubuntu-latest', java: 17 }
- { target: 'KotlinMultiplatform', os: 'ubuntu-latest', java: 17 }
- { target: 'WasmJs', os: 'ubuntu-latest', java: 17 }
name: 'Publish ${{ matrix.config.target }} snapshot artifacts on ${{ matrix.config.os }} JDK ${{ matrix.config.java }}'
runs-on: '${{ matrix.config.os }}'
steps:
- uses: 'actions/checkout@v3'
with:
submodules: 'recursive'
fetch-depth: 0 # all commit history and tags
- uses: 'actions/setup-java@v2'
with:
distribution: 'temurin'
java-version: ${{ matrix.config.java }}
- run: './gradlew publish${{ matrix.config.target }}PublicationToMavenCentralSnapshotsRepository'