Update publish-snapshot.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |