-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.58 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
name: Build and Publish to MC
on:
release:
types: [created]
jobs:
build:
name: Build
runs-on: macos-14
timeout-minutes: 90
env:
DEVELOPER_DIR: /Applications/Xcode_15.0.1.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: '3.2'
- 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: Publish Library on Maven Central 🚀
run: ./gradlew clean publish --no-daemon --no-parallel --no-configuration-cache --stacktrace
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 }}