From 9d033b562f3862183a2aef15949e723f460e94a8 Mon Sep 17 00:00:00 2001 From: Hirotaka Wakabayashi Date: Tue, 26 Oct 2021 12:22:27 +0900 Subject: [PATCH] Uses actions/setup-java@v2 (#12) --- .github/workflows/cron.yml | 39 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index fc75552..f0be168 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -9,34 +9,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup Java JDK - uses: actions/setup-java@v1.4.3 + uses: actions/setup-java@v2 with: - java-version: 1.8 - java-package: jdk - architecture: x64 - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - - - name: Install dependent packages, build package and run tests - run: mvn -B clean exec:exec package --file pom.xml - - - name: Deploy the package to github - # Run deploy action on release - env: - GITHUB_ACTOR: ${{ github.actor }} - GITHUB_TOKEN: ${{ github.token }} - if: github.event_name == 'release' - run: mvn -B deploy --file pom.xml - - - name: Upload a jar file to asset - env: - GITHUB_TOKEN: ${{ github.token }} - if: github.event_name == 'release' - run: mvn -B exec:exec --file pom.xml -Pupload - - - name: Deploy the docs to github - env: - GITPAGES_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKE_FOR_GITPAGES }} - if: github.event_name == 'release' - run: mvn -B site --file pom.xml -s settings.xml + java-version: '11' + distribution: 'adopt' + server-id: ossrh + settings-path: ${{ github.workspace }} + server-username: OSSRH_USERNAME + server-password: OSSRH_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable of GPG private key passphrase