Merge pull request #135 from drasyl/dependabot/maven/org.junit.jupite… #171
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: Deploy | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
jobs: | |
maven-central: | |
name: Deploy to Maven Central | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'adopt' | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Cache Maven packages | |
uses: actions/cache@v4.0.2 | |
with: | |
path: | | |
~/.m2 | |
!~/.m2/settings.xml | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Deploy to Maven Central | |
run: ./mvnw --batch-mode --update-snapshots --activate-profiles release deploy | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_REPO_USER }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_REPO_PASS }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |