-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (46 loc) · 1.53 KB
/
publish-snapshot.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
name: Publish - Snapshot
on:
push:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
- name: Check whether the version is a snapshot
run: |
if grep -q "\-SNAPSHOT" ./contentstack/build.gradle
then
:
else
exit 1
fi
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Setup local.properties
run: |
cat << EOF >> local.properties
sdk.dir=$ANDROID_HOME
host="${{ secrets.HOST }}"
APIKey="${{ secrets.API_KEY }}"
deliveryToken="${{ secrets.DELIVERY_TOKEN }}"
environment="${{ secrets.ENVIRONMENT }}"
contentType="${{ secrets.CONTENT_TYPE }}"
assetUid="${{ secrets.ASSET_UID }}"
EOF
- name: Build the SDK - Snapshot
run: |
./gradlew clean build
- name: Publish the SDK - Snapshot
run: |
./gradlew publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.mavenCentralUsername }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.mavenCentralPassword }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.signingInMemoryKey }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.signingInMemoryKeyId }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.signingInMemoryKeyPassword }}