From af45936918d77df0aab1fcbbd2d4d81e00764da7 Mon Sep 17 00:00:00 2001 From: witskeeper Date: Thu, 8 Aug 2024 10:35:49 +0800 Subject: [PATCH] Update maven-publish.yml --- .github/workflows/maven-publish.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 6da9577..9d49bb5 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -13,25 +13,20 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 1.8 + - name: Set up JDK 8 uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '8.0.422+5' + java-version: '8' - name: Build with Maven run: mvn -B package --file pom.xml - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy - env: - GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password - - name: Set up Apache Maven Central uses: actions/setup-java@v4 with: # running setup-java again overwrites the settings.xml distribution: 'temurin' - java-version: '8.0.422+5' + java-version: '8' server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml server-username: MAVEN_USERNAME # env variable for username in deploy server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy