Skip to content

Commit

Permalink
Uses actions/setup-java@v2 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiwakaba authored Oct 26, 2021
1 parent fec5d67 commit 9d033b5
Showing 1 changed file with 10 additions and 29 deletions.
39 changes: 10 additions & 29 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9d033b5

Please sign in to comment.