diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aefaf52..74cfccd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Build Artifact +name: Deploy package on: push: @@ -7,29 +7,16 @@ on: - 'main' jobs: - build: + deploy: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - name: Set up Maven Central Repository - uses: actions/setup-java@v2 + - name: Checkout Repo + uses: actions/checkout@v2 + + - name: Deploy package + uses: valitydev/action-deploy-jdk-package@v1.0.12 with: - java-version: '15' - distribution: 'adopt' - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - name: Install gpg secret key - run: | - cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import - gpg --list-secret-keys --keyid-format LONG - - name: Publish package - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - run: | - mvn \ - --no-transfer-progress \ - --batch-mode \ - -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \ - clean deploy -Pdeploy \ No newline at end of file + server-username: ${{ secrets.OSSRH_USERNAME }} + server-password: ${{ secrets.OSSRH_TOKEN }} + deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} + deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}