Java Release #46
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: Java Release | |
on: | |
workflow_dispatch: | |
secrets: | |
GPG_PRIVATE_KEY: | |
required: true | |
SONATYPE_PW: | |
required: true | |
SONATYPE_USER: | |
required: true | |
GPG_PASSPHRASE: | |
required: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: fregante/setup-git-user@v1 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Build Docker Image | |
run: docker build . -t build-image | |
- name: Make shared libs | |
run: docker run --rm -v$(pwd):/polymath build-image id | |
- name: Make shared libs | |
run: docker run --rm -v$(pwd):/polymath build-image ls -la | |
- name: Make shared libs | |
run: docker run --rm -v$(pwd):/polymath build-image make | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
cache: 'maven' | |
- name: Set up Maven Central Repository | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
- name: ls | |
run: whoami && id && pwd && ls -la . && ls -la polymath-rs | |
- name: Sync Java Version | |
run: cargo xtask polymath-java sync-version | |
- name: Build with Maven | |
run: cd polymath-java && mvn -B clean deploy -Pci-cd | |
env: | |
MAVEN_USERNAME: ${{ secrets.SONATYPE_USER }} | |
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PW }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |