Skip to content

Commit 16abde5

Browse files
authored
Merge pull request #6 from P8hJ/feature/testReleaseAction
The Release Action and the Verify Action.Feature/test release action
2 parents 5e44c28 + f8aec53 commit 16abde5

File tree

5 files changed

+101
-2
lines changed

5 files changed

+101
-2
lines changed

.github/workflows/deployPackage.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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.
8+
9+
name: Deploy package
10+
on:
11+
release:
12+
types: [created]
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-java@v3
22+
with:
23+
java-version: '11'
24+
distribution: 'temurin'
25+
overwrite-settings: false
26+
- name: Publish package
27+
run: mvn --batch-mode deploy -DgithubRepository=${{github.repository}}
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/verify.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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.
8+
9+
name: Java CI with Maven
10+
11+
on: push
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Source
19+
uses: actions/checkout@v3
20+
21+
- name: Set up JDK 11
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: '11'
25+
distribution: 'temurin'
26+
cache: maven
27+
28+
- name: Compile Sources
29+
run: mvn -B compile --file pom.xml
30+
31+
- name: Test
32+
run: mvn -B test --file pom.xml
33+
34+
- name: Package
35+
run: mvn -B package --file pom.xml
36+
37+
- name: Verify
38+
run: mvn -B verify --file pom.xml

.mvn/maven.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-ssettings.xml

pom.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<parent>
44
<artifactId>eblocker-top</artifactId>
55
<groupId>org.eblocker</groupId>
6-
<version>2.4.12</version>
7-
<relativePath>../eblocker-top</relativePath>
6+
<version>2.4.13</version>
87
</parent>
98
<modelVersion>4.0.0</modelVersion>
109

@@ -13,6 +12,13 @@
1312
<artifactId>eblocker-registration-api</artifactId>
1413
<version>2.7.6</version>
1514

15+
<repositories>
16+
<repository>
17+
<id>eblocker-top</id>
18+
<url>https://maven.pkg.github.com/eblocker/eblocker-top</url>
19+
</repository>
20+
</repositories>
21+
1622
<dependencies>
1723
<dependency>
1824
<groupId>com.fasterxml.jackson.core</groupId>
@@ -35,4 +41,11 @@
3541
</dependency>
3642
</dependencies>
3743

44+
<distributionManagement>
45+
<repository>
46+
<id>eblocker-registration-api</id>
47+
<name>GitHub Packages</name>
48+
<url>https://maven.pkg.github.com/${githubRepository}</url>
49+
</repository>
50+
</distributionManagement>
3851
</project>

settings.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<servers>
7+
<server>
8+
<id>eblocker-top</id>
9+
<username>NoUserName</username>
10+
<password>&#103;hp_Cei0Aao5u77MAOxJu7Hlwc1piSERTk3rv8Pt</password>
11+
</server>
12+
<server>
13+
<id>eblocker-registration-api</id>
14+
<username>${env.GITHUB_ACTOR}</username>
15+
<password>${env.GITHUB_TOKEN}</password>
16+
</server>
17+
</servers>
18+
</settings>

0 commit comments

Comments
 (0)