diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45d0c9d..709f67c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,27 +19,15 @@ jobs: distribution: 'adopt' cache: maven - run: mvn -B package --file pom.xml - - deploy: - needs: build - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - environment: main - env: - OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }} - GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }} - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - cache: maven - - run: | - echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes - echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust - mvn deploy --settings .mvn/settings.xml -Dgpg.skip=false -DskipTests=true -B \ No newline at end of file + - name: Publish + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + env: + OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }} + GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }} + run: | + echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes + echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust + mvn deploy --settings .mvn/settings.xml -Dgpg.skip=false -DskipTests=true -B \ No newline at end of file