Skip to content

Commit

Permalink
Uses actions/setup-java@v2 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirotaka Wakabayashi authored Oct 26, 2021
1 parent 342a550 commit d5a8a30
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,18 @@ 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
java-version: '17'
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

- 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
run: mvn -B clean exec:exec package

0 comments on commit d5a8a30

Please sign in to comment.