1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-25 14:27:33 +00:00

Merge pull request #613 from asbjornu/feature/setup-java2

Bump actions/setup-java from 1 to 2.1.0 and use AdoptOpenJDK
This commit is contained in:
arnaudroques 2021-08-01 21:27:02 +02:00 committed by GitHub
commit 15aaf95dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View File

@ -15,9 +15,10 @@ jobs:
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
uses: actions/setup-java@v2.1.0
with:
java-version: 8
distribution: 'adopt'
- name: Cache local Maven repository
uses: actions/cache@v2
@ -32,6 +33,6 @@ jobs:
# dependencies so without the priming step the cache will be missing some things.
- name: Prime Maven cache
run: mvn --batch-mode dependency:go-offline
- name: Run tests with Maven
run: mvn -B test --file pom.xml

View File

@ -10,7 +10,7 @@ on:
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
jobs:
build_and_upload_jar:
runs-on: ubuntu-latest
@ -26,11 +26,12 @@ jobs:
run: |
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config user.name 'github-actions[bot]'
- name: Setup Java
uses: actions/setup-java@v1
uses: actions/setup-java@v2.1.0
with:
java-version: 8
distribution: 'adopt'
# If this run stores a new cache then the next run will not be able to use it because this is a tag checkout :-(
# But a cache already created on the default branch (by the CI workflow) will be loaded here.
@ -42,7 +43,7 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# The POM version is usually a -SNAPSHOT at this point so we set it to RELEASE_TAG.
- name: Set POM version
run: mvn --batch-mode versions:set "-DnewVersion=${RELEASE_TAG}"
@ -59,7 +60,7 @@ jobs:
run: |
# upload_url with trailing "{..." removed
upload_url="$(echo '${{ github.event.release.upload_url }}' | sed 's/{.*//' )"
http_code=$(curl \
--url "${upload_url}?name=plantuml-${RELEASE_TAG}.jar" \
--header 'Accept: application/vnd.github.v3+json' \
@ -69,8 +70,8 @@ jobs:
--silent \
--output target/response.json \
--write-out '%{http_code}')
echo "Server response ${http_code}:"
cat target/response.json
[ ${http_code} -eq 201 ] || exit 1