Skip to content

Create publish-snapshot.yaml #1

Create publish-snapshot.yaml

Create publish-snapshot.yaml #1

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
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Publish the SDK - Snapshot
run: |
./gradlew clean build
./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 }}