Skip to content

Scala Examples sbt #1202

Scala Examples sbt

Scala Examples sbt #1202

Workflow file for this run

name: flytekit-java build
on:
push:
branches: [master]
pull_request:
jobs:
build-snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-prepare-release-${{ hashFiles('pom.xml') }}
- name: Setup JDK 11
uses: actions/setup-java@v2
with:
java-version: 11.0
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.SONATYPE_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Log in to Docker Hub
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}
- name: Pack with SBT
if: ${{ github.ref != 'refs/heads/master' }}
run: cd flytekit-examples-scala && sbt clean package
- name: Verify with Maven
if: ${{ github.ref != 'refs/heads/master' }}
run: mvn --batch-mode verify -Pci
- name: Release snapshot with Maven
if: ${{ github.ref == 'refs/heads/master' }}
run: |
export GPG_TTY=$(tty)
export DISPLAY=:0
gpg --version
gpg --list-secret-keys --keyid-format LONG
echo "test" | gpg --batch --clearsign --pinentry-mode loopback || true
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>"
mvn --batch-mode deploy -Pci
env:
CI: true
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SONATYPE_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}