Skip to content

Commit 273b820

Browse files
authored
Remove optional profile; set CI JDK version to 17 (#50)
* Set CI JDK version to 17 * Update JDK tools version in CI and use newer Maven cache * Add GPG signing skip
1 parent 08cd259 commit 273b820

File tree

2 files changed

+13
-36
lines changed

2 files changed

+13
-36
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ jobs:
1111
name: Maven PR Builder (JDK ${{ matrix.java }})
1212
runs-on: ubuntu-latest
1313
env:
14-
MAVEN_CACHE_KEY: ${{ secrets.MAVEN_CACHE_KEY }}
1514
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
1615
UCLALIBRARY_SNYK_ORG: ${{ secrets.UCLALIBRARY_SNYK_ORG }}
1716
strategy:
1817
matrix:
19-
java: [ 11, 17 ]
18+
java: [ 17 ]
2019

2120
steps:
2221
- name: Check out code
23-
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2
22+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
2423
- name: Install JDK ${{ matrix.java }}
25-
uses: actions/setup-java@8764a52df183aa0ccea74521dfd9d506ffc7a19a # v2
24+
uses: actions/setup-java@860f60056505705214d223b91ed7a30f173f6142 # v3.3.0
2625
with:
26+
cache: maven
2727
distribution: 'adopt'
2828
java-version: ${{ matrix.java }}
2929
# If running locally in act, install Maven
@@ -32,13 +32,6 @@ jobs:
3232
uses: stCarolas/setup-maven@1d56b37995622db66cce1214d81014b09807fb5a # v4
3333
with:
3434
maven-version: 3.6.3
35-
- name: Set up Maven cache
36-
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a # v2
37-
if: ${{ env.MAVEN_CACHE_KEY }}
38-
with:
39-
path: ~/.m2
40-
key: freelibrary-cache-${{ secrets.MAVEN_CACHE_KEY }}-${{ hashFiles('**/pom.xml') }}
41-
restore-keys: freelibrary-cache-${{ secrets.MAVEN_CACHE_KEY }}-
4235
- name: Build with Maven
4336
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0
4437
with:

.github/workflows/release.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,23 @@ on:
77

88
jobs:
99
publish:
10-
name: Maven Artifact Publisher (JDK 11)
10+
name: Maven Artifact Publisher (JDK 17)
1111
runs-on: ubuntu-latest
12-
env:
13-
AUTORELEASE_ARTIFACT: ${{ secrets.AUTORELEASE_ARTIFACT }}
14-
SKIP_JAR_DEPLOYMENT: ${{ secrets.SKIP_JAR_DEPLOYMENT }}
15-
MAVEN_CACHE_KEY: ${{ secrets.MAVEN_CACHE_KEY }}
1612
steps:
1713
- name: Check out source code
18-
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2
19-
- name: Install JDK 11
20-
uses: actions/setup-java@8764a52df183aa0ccea74521dfd9d506ffc7a19a # v2
14+
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
15+
- name: Install JDK 17
16+
uses: actions/setup-java@860f60056505705214d223b91ed7a30f173f6142 # v3.3.0
2117
with:
18+
cache: maven
2219
distribution: 'adopt'
23-
java-version: 11
20+
java-version: 17
2421
# If running locally in act, install Maven
2522
- name: Set up Maven if needed
2623
if: ${{ env.ACT }}
2724
uses: stCarolas/setup-maven@1d56b37995622db66cce1214d81014b09807fb5a # v4
2825
with:
2926
maven-version: 3.6.3
30-
- name: Set up Maven cache
31-
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a # v2
32-
if: ${{ env.MAVEN_CACHE_KEY }}
33-
with:
34-
path: ~/.m2
35-
key: freelibrary-cache-${{ secrets.MAVEN_CACHE_KEY }}-${{ hashFiles('**/pom.xml') }}
36-
restore-keys: freelibrary-cache-${{ secrets.MAVEN_CACHE_KEY }}-
37-
- name: Set autorelease config
38-
if: env.AUTORELEASE_ARTIFACT == null
39-
run: echo "AUTORELEASE_ARTIFACT=false" >> $GITHUB_ENV
40-
- name: Set Jar deployment config
41-
if: env.SKIP_JAR_DEPLOYMENT == null
42-
run: echo "SKIP_JAR_DEPLOYMENT=false" >> $GITHUB_ENV
4327
- name: Optionally, login to Docker repository
4428
uses: docker/login-action@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a # v1.8.0
4529
env:
@@ -55,11 +39,11 @@ jobs:
5539
gpg_passphrase: ${{ secrets.BUILD_PASSPHRASE }}
5640
nexus_username: ${{ secrets.SONATYPE_USERNAME }}
5741
nexus_password: ${{ secrets.SONATYPE_PASSWORD }}
58-
maven_profiles: release,optional-env-vars
42+
maven_profiles: release
5943
maven_args: >
60-
-Drevision=${{ github.event.release.tag_name }} -DautoReleaseAfterClose=${{ env.AUTORELEASE_ARTIFACT }}
44+
-Drevision=${{ github.event.release.tag_name }}
6145
-ntp -Dorg.slf4j.simpleLogger.log.net.sourceforge.pmd=error -Ddocker.showLogs=true
62-
-DskipNexusStagingDeployMojo=${{ env.SKIP_JAR_DEPLOYMENT }}
46+
-DskipNexusStagingDeployMojo=true -DautoReleaseAfterClose=false -Dgpg.skip=true
6347
-Ddocker.registry.username=${{ secrets.DOCKER_USERNAME }}
6448
-Ddocker.registry.account=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}
6549
-Ddocker.registry.password=${{ secrets.DOCKER_PASSWORD }}

0 commit comments

Comments
 (0)