Skip to content

Create flytekit-java release #96

Create flytekit-java release

Create flytekit-java release #96

Workflow file for this run

name: Create flytekit-java release
on:
workflow_dispatch:
jobs:
build-snapshot:
runs-on: ubuntu-latest
name: flytekit-java release
steps:
- uses: actions/checkout@v2
with:
fetch: "0"
# https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven#caching-dependencies
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-prepare-release-${{ hashFiles('pom.xml') }}
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}
- 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: Setup git configuration
run: |
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git config --global user.name ${{ github.actor }}
- name: Publish to MavenCentral
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
mvn --batch-mode release:prepare -DgenerateBackupPoms=false
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>"
mvn --batch-mode release:perform -Prelease -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 }}