mirror of https://github.com/halo-dev/halo
Simplify Java setup in GitHub workflow (#1509)
Signed-off-by: John Niang <johnniang@fastmail.com>pull/1510/head
parent
1d91450505
commit
6be4051f9e
|
@ -24,28 +24,11 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
cache: 'gradle'
|
||||
java-version: 11
|
||||
|
||||
- name: Cache Gradle wrapper
|
||||
id: cache-gradle-wrapper
|
||||
uses: actions/cache@v2.1.3
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-dependencies-
|
||||
|
||||
- name: Cache Dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v2.1.3
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-dependencies-
|
||||
|
||||
- name: Check And Test
|
||||
run: ./gradlew check
|
||||
build:
|
||||
|
@ -58,26 +41,11 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
cache: 'gradle'
|
||||
java-version: 11
|
||||
- name: Cache Gradle wrapper
|
||||
id: cache-gradle-wrapper
|
||||
uses: actions/cache@v2.1.3
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-dependencies-
|
||||
- name: Cache Dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v2.1.3
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-dependencies-
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew clean build -x test
|
||||
|
||||
|
@ -142,22 +110,11 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
cache: 'gradle'
|
||||
java-version: 11
|
||||
- name: Download halo jar
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: halo-jar
|
||||
path: build/libs
|
||||
- name: Cache Gradle wrapper
|
||||
id: cache-gradle-wrapper
|
||||
uses: actions/cache@v2.1.3
|
||||
with:
|
||||
path: ~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-dependencies-
|
||||
- name: Get version of halo
|
||||
id: get_halo_version
|
||||
run: |
|
||||
|
|
Loading…
Reference in New Issue