Skip to content

Commit 5d38362

Browse files
committed
Updated github workflows
1 parent d46b06f commit 5d38362

4 files changed

Lines changed: 54 additions & 80 deletions

File tree

.github/workflows/main.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,26 @@ jobs:
2424
runs-on: ubuntu-latest
2525

2626
steps:
27-
- uses: actions/checkout@v3
28-
- name: Set up JDK 11
29-
uses: actions/setup-java@v3
30-
with:
31-
java-version: '11'
32-
distribution: 'temurin'
33-
- name: Restore gradle.properties
34-
env:
35-
GRADLE_PROPERTIES: ${{ secrets.GRADLE_PROPERTIES }}
36-
shell: bash
37-
run: |
38-
mkdir -p ~/.gradle/
39-
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
40-
echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties
41-
- name: Build with Gradle
42-
uses: gradle/gradle-build-action@v2
43-
with:
44-
arguments: test
27+
- uses: actions/checkout@v5
28+
- name: Build Project
29+
uses: actions/setup-java@v5
30+
with:
31+
java-version: '17'
32+
distribution: 'temurin'
33+
- name: Set up Gradle
34+
uses: gradle/actions/setup-gradle@v4
35+
with:
36+
cache-read-only: ${{ !((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref_name == 'master' || github.ref_name == 'main' || startsWith(github.ref_name, 'v'))) }}
37+
- name: Build Project
38+
timeout-minutes: 35
39+
env:
40+
PUBLISH_SCANS: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
41+
&& (github.ref_name == 'master' || github.ref_name == 'main' || startsWith(github.ref_name, 'v')) }}
42+
run: ./gradlew build --scan --no-daemon --console=plain
43+
- name: Upload test reports
44+
uses: actions/upload-artifact@v4
45+
if: always()
46+
with:
47+
name: test-reports
48+
path: "**/build/reports/*"
49+
retention-days: 5

.github/workflows/maven.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,33 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v3
23-
- name: Set up JDK 17
24-
uses: actions/setup-java@v3
25-
with:
26-
java-version: '17'
27-
distribution: 'temurin'
28-
cache: gradle
29-
- name: Restore gradle.properties
30-
env:
31-
GRADLE_PROPERTIES: ${{ secrets.GRADLE_PROPERTIES }}
32-
shell: bash
33-
run: |
34-
mkdir -p ~/.gradle/
35-
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
36-
echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties
37-
- name: Restore gpg key
38-
env:
39-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
40-
shell: bash
41-
run: |
42-
mkdir /home/runner/.gnupg
43-
echo -n "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode > /home/runner/.gnupg/secring.gpg
44-
- name: Execute Gradle publish
45-
run: ./gradlew clean build publish --refresh-dependencies --info
46-
- name: Upload test reports
47-
uses: actions/upload-artifact@v4
48-
if: always()
49-
with:
50-
name: test-reports
51-
path: "**/build/reports/*"
52-
retention-days: 5
22+
- uses: actions/checkout@v5
23+
- name: Build Project
24+
uses: actions/setup-java@v5
25+
with:
26+
java-version: '17'
27+
distribution: 'temurin'
28+
- name: Restore gradle.properties
29+
env:
30+
GRADLE_PROPERTIES: ${{ secrets.GRADLE_PROPERTIES }}
31+
shell: bash
32+
run: |
33+
mkdir -p ~/.gradle/
34+
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
35+
echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties
36+
- name: Restore gpg key
37+
env:
38+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
39+
shell: bash
40+
run: |
41+
mkdir /home/runner/.gnupg
42+
echo -n "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode > /home/runner/.gnupg/secring.gpg
43+
- name: Execute Gradle publish
44+
run: ./gradlew build --scan --no-daemon --console=plain
45+
- name: Upload test reports
46+
uses: actions/upload-artifact@v4
47+
if: always()
48+
with:
49+
name: test-reports
50+
path: "**/build/reports/*"
51+
retention-days: 5

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
}
99

1010
group = 'com.formkiq'
11-
version = '1.18.1-SNAPSHOT'
11+
version = '1.18.1'
1212

1313
sourceCompatibility = JavaVersion.VERSION_11
1414
targetCompatibility = JavaVersion.VERSION_11

0 commit comments

Comments
 (0)