diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 652b01d..9dd5638 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -25,29 +25,46 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - name: Set up JDK 11
- uses: actions/setup-java@v3
- with:
- java-version: '11'
- distribution: 'temurin'
- cache: maven
- server-username: MAVEN_USERNAME
- server-password: MAVEN_PASSWORD
- gpg-private-key: ${{ secrets.HIGHFLIP_GPG_SECRET_KEY }}
- gpg-passphrase: MAVEN_GPG_PASSPHRASE
- - name: Publish to the Maven Central Repository
- run: |
- mvn clean \
- --no-transfer-progress \
- --batch-mode \
- -Prelease \
- -DskipTests \
- deploy --file pom.xml
- env:
- MAVEN_USERNAME: ${{ secrets.HIGHFLIP_MAVEN_USERNAME }}
- MAVEN_PASSWORD: ${{ secrets.HIGHFLIP_MAVEN_TOKEN }}
- MAVEN_GPG_PASSPHRASE: ${{ secrets.HIGHFLIP_GPG_SECRET_KEY_PASSWORD }}
+ - name: Checkout project
+ uses: actions/checkout@v3
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'temurin'
+# cache: maven
+# server-username: MAVEN_USERNAME
+# server-password: MAVEN_PASSWORD
+# gpg-private-key: ${{ secrets.HIGHFLIP_GPG_SECRET_KEY }}
+# gpg-passphrase: MAVEN_GPG_PASSPHRASE
+
+ - name: Build with Maven
+ run: mvn -B package -DskipTests -Prelease --file pom.xml
+
+ - name: Set up Apache Maven Central
+ uses: actions/setup-java@v3
+ with: # running setup-java again overwrites the settings.xml
+ java-version: '11'
+ distribution: 'temurin'
+ server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
+ server-username: MAVEN_USERNAME # env variable for username in deploy
+ server-password: MAVEN_PASSWORD # env variable for token in deploy
+ gpg-private-key: ${{ secrets.HIGHFLIP_GPG_SECRET_KEY }} # Value of the GPG private key to import
+ gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
+
+ - name: Publish to the Maven Central Repository
+ run: |
+ mvn clean \
+ --no-transfer-progress \
+ --batch-mode \
+ -Prelease \
+ -DskipTests \
+ deploy --file pom.xml
+ env:
+ MAVEN_USERNAME: ${{ secrets.HIGHFLIP_MAVEN_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.HIGHFLIP_MAVEN_TOKEN }}
+ MAVEN_GPG_PASSPHRASE: ${{ secrets.HIGHFLIP_GPG_SECRET_KEY_PASSWORD }}
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
diff --git a/pom.xml b/pom.xml
index e78d907..4ad451c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,18 +62,6 @@
-
-
- ossrh-snapshot
- https://oss.sonatype.org/content/repositories/snapshots
-
-
- ossrh
- Central Repository OSSRH
- https://oss.sonatype.org/service/local/staging/deploy/maven2/
-
-
-
https://github.com/baidu/highflip
scm:git:git://github.com/baidu/highflip.git
@@ -237,6 +225,18 @@
release
+
+
+ ossrh
+ Central Repository OSSRH
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+ ossrh
+ Central Repository OSSRH
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
@@ -307,23 +307,13 @@
${nexus.staging.maven.plugin.version}
true
- sonatype-nexus-repository
+ ossrh
https://oss.sonatype.org
true
-
-
- sonatype-nexus-repository
- https://oss.sonatype.org/content/repositories/snapshots
-
-
- sonatype-nexus-repository
- https://oss.sonatype.org/service/local/staging/deploy/maven2/
-
-
\ No newline at end of file