-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.65 KB
/
publishToMC.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
name: Build and Publish to MC
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: macos-latest
timeout-minutes: 90
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
steps:
- uses: actions/checkout@v3
- name: Set up JDK 🍵
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Install Cocoapods 🌴
run: |
gem install cocoapods
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Cache Gradle and wrapper
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build
run: ./gradlew assemble
- name: Publish Library on Maven Central 🚀
run: ./gradlew publishKotlinMultiplatformPublicationToMavenCentralRepository --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}