Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

repository_dispatch #102

repository_dispatch

repository_dispatch #102

name: Publish to NetflixOSS and Maven Central after conductor Core Release
on:
repository_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
name: Gradle Build and Publish
steps:
- uses: actions/checkout@v2
- name: Set up Zulu JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish Build
if: contains(${{ github.event.client_payload.tag }}, '-rc.')
run: |
export TAG=${{ github.event.client_payload.tag }}
export VERSION=$(echo $TAG | cut -d'v' -f2)
export RC=rc
sed -i "s/revConductor =.*/revConductor = '$VERSION'/g" dependencies.gradle
./gradlew generateLock saveLock
git config --global user.name 'Anoop Panicker'
git config --global user.email 'apanicker@netflix.com'
git commit -am "Update Conductor version dependency to $VERSION"
git push
cat dependencies.gradle | grep revConductor
if [[ "$TAG" == *"$RC"* ]]; then
echo "Publishing release candidate";
./gradlew -Prelease.version=$VERSION candidate --scan
else
echo "Publishing Final Release";
./gradlew -Prelease.version=$VERSION final --scan
fi
env:
NETFLIX_OSS_SONATYPE_USERNAME: ${{ secrets.ORG_SONATYPE_USERNAME }}
NETFLIX_OSS_SONATYPE_PASSWORD: ${{ secrets.ORG_SONATYPE_PASSWORD }}
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}