Merge pull request #3794 from kubernetes-client/dependabot/maven/comm… #862
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: Upload Snapshot | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
jobs: | |
verify: | |
name: latest-images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17.0.x | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_TOKEN | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Assert Snapshot Version | |
run: | | |
./mvnw clean install -Dmaven.test.skip=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
./mvnw -q \ | |
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ | |
-Dexec.executable=echo \ | |
-Dexec.args='${project.version}' \ | |
exec:exec | perl -ne 'die unless m/.*-SNAPSHOT/' | |
- name: Publish to Apache Maven Central | |
run: ./mvnw deploy | |
env: | |
OSSRH_USERNAME: ${{ secrets.SNAPSHOT_UPLOAD_USER }} | |
OSSRH_TOKEN: ${{ secrets.SNAPSHOT_UPLOAD_PASSWORD }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} |