Skip to content

Commit 34da2ba

Browse files
committed
Workflow review and transition to node 20
fugerit-org/fj-universe#29
1 parent 7892223 commit 34da2ba

File tree

5 files changed

+98
-84
lines changed

5 files changed

+98
-84
lines changed

.github/workflows/build_maven_compatibility.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
1+
# CI maven compatibility check
2+
#
3+
# version 1.0.0
4+
#
5+
# see : https://universe.fugerit.org/src/docs/conventions/workflows/build_maven_compatibility.html
86

97
name: CI maven compatibility check
108

@@ -13,21 +11,21 @@ on:
1311
# a pull request.
1412
push:
1513
branches:
16-
- develop
14+
- branch-compatibility
1715

1816
jobs:
1917
check-main:
2018
runs-on: ${{ matrix.os }}
2119
strategy:
2220
matrix:
2321
distribution: [ 'corretto' ]
24-
java: [ '11', '17' ]
22+
java: [ '11', '17', '21' ]
2523
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
2624
name: Java ${{ matrix.os }} ${{ matrix.java }} (${{ matrix.distribution }}) compatibility check
2725
steps:
28-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@main
2927
- name: Setup java
30-
uses: actions/setup-java@v3
28+
uses: actions/setup-java@main
3129
with:
3230
distribution: ${{ matrix.distribution }}
3331
java-version: ${{ matrix.java }}
@@ -42,9 +40,9 @@ jobs:
4240
os: [ 'ubuntu-latest' ]
4341
name: Java ${{ matrix.os }} ${{ matrix.java }} (${{ matrix.distribution }}) compatibility check
4442
steps:
45-
- uses: actions/checkout@v3
43+
- uses: actions/checkout@main
4644
- name: Setup java
47-
uses: actions/setup-java@v3
45+
uses: actions/setup-java@main
4846
with:
4947
distribution: ${{ matrix.distribution }}
5048
java-version: ${{ matrix.java }}
@@ -55,13 +53,13 @@ jobs:
5553
strategy:
5654
matrix:
5755
distribution: [ 'microsoft' ]
58-
java: [ '11', '17' ]
56+
java: [ '17' ]
5957
os: [ 'windows-latest' ]
6058
name: Java ${{ matrix.os }} ${{ matrix.java }} (${{ matrix.distribution }}) compatibility check
6159
steps:
62-
- uses: actions/checkout@v3
60+
- uses: actions/checkout@main
6361
- name: Setup java
64-
uses: actions/setup-java@v3
62+
uses: actions/setup-java@main
6563
with:
6664
distribution: ${{ matrix.distribution }}
6765
java-version: ${{ matrix.java }}
Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
1+
# CI with maven build and scan
2+
#
3+
# version 1.0.0
4+
#
5+
# see : https://universe.fugerit.org/src/docs/conventions/workflows/build_maven_package.html
36

4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
9-
name: CI maven build and sonar cloud scan
7+
name: CI maven build and scan
108

119
on:
1210
# Trigger analysis when pushing in master or pull requests, and when creating
1311
# a pull request.
1412
push:
1513
branches:
1614
- main
17-
- branch-sonarcloud
15+
- develop
16+
- branch-preview
1817
pull_request:
1918
types:
2019
- opened
@@ -26,28 +25,31 @@ jobs:
2625
name: Build
2726
runs-on: ubuntu-latest
2827
steps:
29-
- uses: actions/checkout@v3
28+
- uses: actions/checkout@main
3029
with:
3130
# Shallow clones should be disabled for a better relevancy of analysis
3231
fetch-depth: 0
3332
- name: Set up JDK 17
34-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@main
3534
with:
3635
java-version: '17'
3736
distribution: 'corretto'
3837
cache: 'maven'
3938
- name: Cache Maven packages
40-
uses: actions/cache@v1
39+
uses: actions/cache@main
4140
with:
4241
path: ~/.m2
4342
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4443
restore-keys: ${{ runner.os }}-m2
4544
- name: Cache SonarCloud packages
46-
uses: actions/cache@v1
45+
uses: actions/cache@main
4746
with:
4847
path: ~/.sonar/cache
4948
key: ${{ runner.os }}-sonar
5049
restore-keys: ${{ runner.os }}-sonar
50+
- uses: actions/setup-node@main
51+
with:
52+
node-version: 20
5153
- name: Maven version
5254
run: mvn -v
5355
env:
@@ -63,6 +65,6 @@ jobs:
6365
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
6466
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6567

66-
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
68+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
6769
- name: Update dependency graph
68-
uses: advanced-security/maven-dependency-submission-action@v3.0.2
70+
uses: advanced-security/maven-dependency-submission-action@main
Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
# CodeQL
2+
#
3+
# version 1.0.0
4+
#
5+
# see : https://universe.fugerit.org/src/docs/conventions/workflows/codeql-analysis.html
6+
17
# For most projects, this workflow file will not need changing; you simply need
28
# to commit it to your repository.
39
#
410
# You may wish to alter this file to override the set of languages analyzed,
511
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
12+
1213
name: "CodeQL"
1314

1415
on:
@@ -39,38 +40,45 @@ jobs:
3940
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
4041

4142
steps:
42-
- name: Checkout repository
43-
uses: actions/checkout@v3
43+
- name: Checkout repository
44+
uses: actions/checkout@main
45+
46+
- name: Set up JDK 17
47+
uses: actions/setup-java@main
48+
with:
49+
java-version: '17'
50+
distribution: 'corretto'
51+
cache: 'maven'
4452

45-
# Initializes the CodeQL tools for scanning.
46-
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
48-
with:
49-
languages: ${{ matrix.language }}
50-
# If you wish to specify custom queries, you can do so here or in a config file.
51-
# By default, queries listed here will override any specified in a config file.
52-
# Prefix the list here with "+" to use these queries and those in the config file.
53+
# Initializes the CodeQL tools for scanning.
54+
- name: Initialize CodeQL
55+
uses: github/codeql-action/init@main
56+
with:
57+
languages: ${{ matrix.language }}
58+
# If you wish to specify custom queries, you can do so here or in a config file.
59+
# By default, queries listed here will override any specified in a config file.
60+
# Prefix the list here with "+" to use these queries and those in the config file.
5361

54-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
55-
# queries: security-extended,security-and-quality
62+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
63+
# queries: security-extended,security-and-quality
5664

5765

58-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
59-
# If this step fails, then you should remove it and run the build manually (see below)
60-
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v2
66+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
67+
# If this step fails, then you should remove it and run the build manually (see below)
68+
- name: Autobuild
69+
uses: github/codeql-action/autobuild@main
6270

63-
# ℹ️ Command-line programs to run using the OS shell.
64-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
71+
# ℹ️ Command-line programs to run using the OS shell.
72+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6573

66-
# If the Autobuild fails above, remove it and uncomment the following three lines.
67-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
74+
# If the Autobuild fails above, remove it and uncomment the following three lines.
75+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6876

69-
# - run: |
70-
# echo "Run, Build Application using script"
71-
# ./location_of_script_within_repo/buildscript.sh
77+
# - run: |
78+
# echo "Run, Build Application using script"
79+
# ./location_of_script_within_repo/buildscript.sh
7280

73-
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v2
75-
with:
76-
category: "/language:${{matrix.language}}"
81+
- name: Perform CodeQL Analysis
82+
uses: github/codeql-action/analyze@main
83+
with:
84+
category: "/language:${{matrix.language}}"
Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
1+
# CI deploy maven package
2+
#
3+
# version 1.0.0
4+
#
5+
# see : https://universe.fugerit.org/src/docs/conventions/workflows/deploy_maven_package.html
86

97
name: CI deploy maven package
108

119
on:
1210
push:
1311
branches:
14-
- deploy
12+
- branch-deploy
1513

1614
jobs:
1715
build:
1816

1917
runs-on: ubuntu-latest
2018

2119
steps:
22-
- uses: actions/checkout@v3
23-
- name: Set up JDK 11
24-
uses: actions/setup-java@v3
20+
- uses: actions/checkout@main
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@main
2523
with:
26-
java-version: '11'
24+
java-version: '17'
2725
distribution: 'corretto'
2826
cache: maven
29-
- name: Release Maven package
30-
uses: samuelmeuli/action-maven-publish@v1
31-
with:
32-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
33-
gpg_passphrase: ${{ secrets.PASSPHRASE }}
34-
nexus_username: ${{ secrets.OSS_USERNAME }}
35-
nexus_password: ${{ secrets.OSS_PASSWORD }}
36-
maven_args: -P doRelease
27+
server-id: ossrh
28+
server-username: MAVEN_USERNAME
29+
server-password: MAVEN_PASSWORD
30+
- name: Import gpg
31+
run: echo -e "${{ secrets.PASSPHRASE }}" | echo -e "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --allow-secret-key-import --import
32+
- name: Build package
33+
run: mvn clean install -P full,coverage,metadata
34+
- name: Publish package
35+
run: mvn --batch-mode deploy -P doRelease
36+
env:
37+
MAVEN_USERNAME: ${{ secrets.OSS_USERNAME }}
38+
MAVEN_PASSWORD: ${{ secrets.OSS_PASSWORD }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- [Workflow review and transition to node 20](https://github.com/fugerit-org/fj-universe/issues/29)
13+
1014
## [0.4.2] - 2023-11-24
1115

1216
## [0.4.1] - 2023-09-24

0 commit comments

Comments
 (0)