diff --git a/.github/workflows/mvn_publish.yml b/.github/workflows/mvn_publish.yml index a27e18b..dc01e68 100644 --- a/.github/workflows/mvn_publish.yml +++ b/.github/workflows/mvn_publish.yml @@ -22,26 +22,18 @@ jobs: publish: runs-on: ubuntu-latest steps: - # Step 1: Check out the code - uses: actions/checkout@v4 - - # Step 2: Set up the Java environment - uses: actions/setup-java@v4 with: java-version: '8' distribution: 'zulu' server-id: ossrh - server-username: ${{ secrets.MAVEN_USERNAME }} - server-password: ${{ secrets.MAVEN_PASSWORD }} - gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - - # Step 3: Verify if the GPG key is correctly imported - - name: Verify GPG Key - run: gpg --list-secret-keys --keyid-format LONG + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - # Step 4: Build and publish using Maven - - name: Build and Publish with Maven + - name: Build with Maven run: mvn clean deploy --batch-mode -DskipTests -P release -B -U -e env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}