From d2eded97425130e11334ae97426b4ae337d04df0 Mon Sep 17 00:00:00 2001 From: Aravind Kumar Date: Mon, 12 Feb 2024 12:07:41 +0530 Subject: [PATCH] Create publish-snapshot.yaml --- .github/workflows/publish-snapshot.yaml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish-snapshot.yaml diff --git a/.github/workflows/publish-snapshot.yaml b/.github/workflows/publish-snapshot.yaml new file mode 100644 index 00000000..6ee1af6f --- /dev/null +++ b/.github/workflows/publish-snapshot.yaml @@ -0,0 +1,31 @@ +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 }}