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

Commit

Permalink
Merge pull request #2665 from Netflix/publish_workflow
Browse files Browse the repository at this point in the history
Publish workflow
  • Loading branch information
apanicker-nflx authored Dec 21, 2021
2 parents ad477f8 + 11e0298 commit 70ed447
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fetch-depth: 0
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up Zulu JDK 11
- name: Set up Zulu JDK 8
uses: actions/setup-java@v2
with:
distribution: 'zulu'
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish to NetflixOSS and Maven Central
on:
release:
types:
- released
- prereleased

jobs:
publish:
runs-on: ubuntu-latest
name: Gradle Build and Publish
steps:
- uses: actions/checkout@v2
- name: Set up Zulu JDK 8
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '8'
- 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 candidate
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-rc.')
run: ./gradlew -x :conductor-contribs:test -Prelease.useLastTag=true candidate --scan
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 }}
- name: Publish release
if: startsWith(github.ref, 'refs/tags/v') && (!contains(github.ref, '-rc.'))
run: ./gradlew -x :conductor-contribs:test -Prelease.useLastTag=true final --scan
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 }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ bin/
target/
.DS_Store
.vscode/
buildscan.log

# publishing secrets
secrets/signing-key
File renamed without changes.

0 comments on commit 70ed447

Please sign in to comment.