Bump org.apache.maven.plugins:maven-resources-plugin from 3.4.0 to 3.… #97
This file contains hidden or 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: Deploy snapshots | |
| # see https://docs.github.com/en/actions/guides/publishing-java-packages-with-maven | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| release: | |
| name: Release on Sonatype OSS | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| server-id: ossrh | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
| gpg-passphrase: MAVEN_GPG_PASSPHRASE | |
| cache: 'maven' | |
| - name: Publish to Apache Maven Central | |
| run: | | |
| PROJECT_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | |
| if [[ "$PROJECT_VERSION" == *-SNAPSHOT ]]; then | |
| mvn --batch-mode -Prelease deploy | |
| else | |
| mvn --batch-mode package | |
| fi | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
| MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to Docker Hub | |
| run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
| - name: Docker Build and Push the snapshot image | |
| run: docker buildx build --push -f Dockerfile --tag kwart/jd-cli:latest . |