-
Notifications
You must be signed in to change notification settings - Fork 24
46 lines (36 loc) · 1.32 KB
/
gradle-publish.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
# This workflow will build a package using Gradle and then publish it to Maven Central when a release is published.
name: Publish to Maven Central
on:
release:
types: [published]
jobs:
build:
runs-on: macos-13
permissions:
contents: read
packages: read
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
working-directory: android
- name: Install cargo-ndk
run: cargo install cargo-ndk
- name: Creat local.properties (required for cargo-ndk and the demo app)
run: echo 'stadiaApiKey=' > local.properties
working-directory: android
- name: Publish to Maven Central
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
working-directory: android
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_GPG_PASSPHRASE }}