Skip to content

Commit 37ce2cf

Browse files
committed
Github workflow updates
1 parent ab93bae commit 37ce2cf

291 files changed

Lines changed: 32030 additions & 32030 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check.yaml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
name: Run dependency and spotbugs checks
2-
3-
on:
4-
workflow_run:
5-
workflows: ["Run tests"]
6-
types:
7-
- completed
8-
workflow_dispatch:
9-
10-
permissions:
11-
contents: read
12-
13-
jobs:
14-
run-checks:
15-
name: Run dependency and spotbugs checks
16-
runs-on: ubuntu-latest
17-
18-
steps:
19-
- uses: actions/checkout@v4
20-
21-
- name: Setup java
22-
uses: actions/setup-java@v4
23-
with:
24-
java-version: '17'
25-
distribution: 'temurin'
26-
cache: maven
27-
28-
- name: Run dependency check
29-
run: |
30-
./mvnw -DossIndexUsername=${{ secrets.ossIndexUsername }} -DossIndexPassword=${{ secrets.ossIndexPassword }} -DnvdApiKey=${{ secrets.nvdApiKey }} org.owasp:dependency-check-maven:check
31-
32-
- name: Archive dependency report
33-
uses: actions/upload-artifact@v4
34-
with:
35-
name: dependency-report
36-
path: target/dependency-check-report.html
37-
38-
- name: Run spotbugs check
39-
run: |
40-
./mvnw spotbugs:check
1+
name: Run dependency and spotbugs checks
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Run tests"]
6+
types:
7+
- completed
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
run-checks:
15+
name: Run dependency and spotbugs checks
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup java
22+
uses: actions/setup-java@v4
23+
with:
24+
java-version: '17'
25+
distribution: 'temurin'
26+
cache: maven
27+
28+
- name: Run dependency check
29+
run: |
30+
./mvnw -DossIndexUsername=${{ secrets.ossIndexUsername }} -DossIndexPassword=${{ secrets.ossIndexPassword }} -DnvdApiKey=${{ secrets.nvdApiKey }} org.owasp:dependency-check-maven:check
31+
32+
- name: Archive dependency report
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: dependency-report
36+
path: target/dependency-check-report.html
37+
38+
- name: Run spotbugs check
39+
run: |
40+
./mvnw spotbugs:check

.github/workflows/publish.yaml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
name: Publish to maven repository
2-
3-
on:
4-
release:
5-
types:
6-
- published
7-
8-
permissions:
9-
contents: read
10-
11-
jobs:
12-
package_and_publish:
13-
name: Publish to maven repository
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
- uses: actions/checkout@v4
18-
- name: Setup java SDK 17
19-
uses: actions/setup-java@v4
20-
with:
21-
java-version: '17'
22-
distribution: 'temurin'
23-
cache: maven
24-
-
25-
name: Import GPG key
26-
uses: crazy-max/ghaction-import-gpg@v6
27-
with:
28-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
29-
#passphrase: ${{ secrets.PASSPHRASE }}
30-
31-
- name: Create bundle and upload to oss.sonatype.org (staging)
32-
# Fail on first error
33-
run: |
34-
set -e
35-
version=${{ github.event.release.name }}
36-
artifact=smart-id-java-client-$version
37-
echo "[INFO] Artifact name: $artifact"
38-
./mvnw versions:set -DnewVersion="$version"
39-
./mvnw package -DskipTests
40-
cd target
41-
rm -rf ee/sk/smartid/smart-id-java-client/$version
42-
mkdir -p ee/sk/smartid/smart-id-java-client/$version
43-
cp $artifact.jar ee/sk/smartid/smart-id-java-client/$version/
44-
cp $artifact-sources.jar ee/sk/smartid/smart-id-java-client/$version/
45-
cp $artifact-javadoc.jar ee/sk/smartid/smart-id-java-client/$version/
46-
cp ../pom.xml ee/sk/smartid/smart-id-java-client/$version/$artifact.pom
47-
cd ee/sk/smartid/smart-id-java-client/$version
48-
gpg -ab $artifact.pom
49-
gpg -ab $artifact.jar
50-
gpg -ab $artifact-sources.jar
51-
gpg -ab $artifact-javadoc.jar
52-
find . -type f \( -name '*.jar' -o -name '*.pom' \) -exec sh -c 'for file; do sha256sum "$file" | cut -d " " -f 1 > "$file.sha256"; done' _ {} +
53-
find . -type f \( -name '*.jar' -o -name '*.pom' \) -exec sh -c 'for file; do sha1sum "$file" | cut -d " " -f 1 > "$file.sha1"; done' _ {} +
54-
find . -type f \( -name '*.jar' -o -name '*.pom' \) -exec sh -c 'for file; do md5sum "$file" | cut -d " " -f 1 > "$file.md5"; done' _ {} +
55-
cd ../../../../../
56-
zip bundle.zip ee/sk/smartid/smart-id-java-client/$version/*
57-
CODE=$(curl -w "%{http_code}" -o curl_response.txt -s --request POST --verbose --header 'Authorization: Bearer ${{ secrets.SONATYPETOKEN }}' --form bundle=@bundle.zip https://central.sonatype.com/api/v1/publisher/upload)
58-
echo "[INFO] ------------------------------------------------------------------------"
59-
echo "[INFO] Upload to central.sonatype.com ResponseCode: $CODE"
60-
cat curl_response.txt
61-
echo -e "\n[INFO] Login to central.sonatype.com for releasing $artifact"
62-
echo "[INFO] ------------------------------------------------------------------------"
63-
[[ $CODE == 201 ]] && exit 0 || exit 1
64-
1+
name: Publish to maven repository
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
package_and_publish:
13+
name: Publish to maven repository
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Setup java SDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: '17'
22+
distribution: 'temurin'
23+
cache: maven
24+
-
25+
name: Import GPG key
26+
uses: crazy-max/ghaction-import-gpg@v6
27+
with:
28+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
29+
#passphrase: ${{ secrets.PASSPHRASE }}
30+
31+
- name: Create bundle and upload to oss.sonatype.org (staging)
32+
# Fail on first error
33+
run: |
34+
set -e
35+
version=${{ github.event.release.name }}
36+
artifact=smart-id-java-client-$version
37+
echo "[INFO] Artifact name: $artifact"
38+
./mvnw versions:set -DnewVersion="$version"
39+
./mvnw package -DskipTests
40+
cd target
41+
rm -rf ee/sk/smartid/smart-id-java-client/$version
42+
mkdir -p ee/sk/smartid/smart-id-java-client/$version
43+
cp $artifact.jar ee/sk/smartid/smart-id-java-client/$version/
44+
cp $artifact-sources.jar ee/sk/smartid/smart-id-java-client/$version/
45+
cp $artifact-javadoc.jar ee/sk/smartid/smart-id-java-client/$version/
46+
cp ../pom.xml ee/sk/smartid/smart-id-java-client/$version/$artifact.pom
47+
cd ee/sk/smartid/smart-id-java-client/$version
48+
gpg -ab $artifact.pom
49+
gpg -ab $artifact.jar
50+
gpg -ab $artifact-sources.jar
51+
gpg -ab $artifact-javadoc.jar
52+
find . -type f \( -name '*.jar' -o -name '*.pom' \) -exec sh -c 'for file; do sha256sum "$file" | cut -d " " -f 1 > "$file.sha256"; done' _ {} +
53+
find . -type f \( -name '*.jar' -o -name '*.pom' \) -exec sh -c 'for file; do sha1sum "$file" | cut -d " " -f 1 > "$file.sha1"; done' _ {} +
54+
find . -type f \( -name '*.jar' -o -name '*.pom' \) -exec sh -c 'for file; do md5sum "$file" | cut -d " " -f 1 > "$file.md5"; done' _ {} +
55+
cd ../../../../../
56+
zip bundle.zip ee/sk/smartid/smart-id-java-client/$version/*
57+
CODE=$(curl -w "%{http_code}" -o curl_response.txt -s --request POST --verbose --header 'Authorization: Bearer ${{ secrets.SONATYPETOKEN }}' --form bundle=@bundle.zip https://central.sonatype.com/api/v1/publisher/upload)
58+
echo "[INFO] ------------------------------------------------------------------------"
59+
echo "[INFO] Upload to central.sonatype.com ResponseCode: $CODE"
60+
cat curl_response.txt
61+
echo -e "\n[INFO] Login to central.sonatype.com for releasing $artifact"
62+
echo "[INFO] ------------------------------------------------------------------------"
63+
[[ $CODE == 201 ]] && exit 0 || exit 1
64+

.github/workflows/tests.yaml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
name: Run tests
2-
3-
on:
4-
push:
5-
branches: [ "master", "v3.1" ]
6-
pull_request:
7-
branches: [ "master" ]
8-
9-
permissions:
10-
contents: read
11-
12-
jobs:
13-
run-tests:
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
java-version: ['17', '21']
18-
name: Run tests with java SDK ${{ matrix.java-version }}
19-
20-
steps:
21-
- uses: actions/checkout@v4
22-
23-
- name: Setup java
24-
uses: actions/setup-java@v4
25-
with:
26-
java-version: ${{ matrix.java-version }}
27-
distribution: 'temurin'
28-
cache: maven
29-
30-
- name: Check JAVA version (v${{ matrix.java-version }})
31-
run: java -version
32-
33-
- name: Run tests
34-
# Fail on first error
35-
run: |
36-
set -e
1+
name: Run tests
2+
3+
on:
4+
push:
5+
branches: [ "master", "v3.1" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
run-tests:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
java-version: ['17', '21']
18+
name: Run tests with java SDK ${{ matrix.java-version }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup java
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: ${{ matrix.java-version }}
27+
distribution: 'temurin'
28+
cache: maven
29+
30+
- name: Check JAVA version (v${{ matrix.java-version }})
31+
run: java -version
32+
33+
- name: Run tests
34+
# Fail on first error
35+
run: |
36+
set -e
3737
mvn test

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.idea
2-
*.iml
3-
target
4-
.settings
5-
.classpath
6-
.project
1+
.idea
2+
*.iml
3+
target
4+
.settings
5+
.classpath
6+
.project

0 commit comments

Comments
 (0)