-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Yuvraj <[email protected]>
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: flytekit-java build | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-snapshot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: "0" | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-prepare-release-${{ hashFiles('pom.xml') }} | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11.0 | ||
distribution: 'adopt' | ||
- name: Log in to Docker Hub | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ secrets.FLYTE_BOT_USERNAME }} | ||
password: ${{ secrets.FLYTE_BOT_PAT }} | ||
- uses: s4u/[email protected] | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
with: | ||
servers: | | ||
[{ | ||
"id": "flytekit-java-release", | ||
"username": "${{ secrets.SONATYPE_USERNAME }}", | ||
"password": "${{ secrets.SONATYPE_PASSWORD }}" | ||
}] | ||
- name: Verify with Maven | ||
run: mvn verify | ||
- name: Release snapshot with Maven | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
env: | ||
RELEASE_REPOSITORY_URL: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
SNAPSHOTS_REPOSITORY_URL: "https://s01.oss.sonatype.org/content/repositories/snapshots" | ||
run: mvn deploy -DpreparationGoals=clean -DskipTests=true -Ddocker.image=gcr.io/flyteorg/jflyte -Ddockerfile.push |
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