Workflow file for this run
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 to NetflixOSS and Maven Central" | |
# push: | |
# tags: | |
# - v*.*.* | |
# - v*.*.*-rc.* | |
on: | |
release: | |
types: | |
- released | |
- prereleased | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- uses: actions/[email protected] | |
id: gradle-cache | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }} | |
restore-keys: | | |
- ${{ runner.os }}-gradle- | |
- uses: actions/[email protected] | |
id: gradle-wrapper-cache | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }} | |
restore-keys: | | |
- ${{ runner.os }}-gradlewrapper- | |
- name: Publish candidate | |
if: contains(github.ref, '-rc.') | |
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate | |
env: | |
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 }} | |
- name: Publish release | |
if: (!contains(github.ref, '-rc.')) | |
run: ./gradlew --info -Dgradle.publish.key=${{ secrets.ORG_GRADLE_PUBLISH_KEY }} -Dgradle.publish.secret=${{ secrets.ORG_GRADLE_PUBLISH_SECRET }} -Prelease.useLastTag=true final | |
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 }} |