Skip to content

Commit 5c1df7d

Browse files
committed
release 4.1.0 + gitHub update
1 parent 98fe402 commit 5c1df7d

5 files changed

Lines changed: 52 additions & 68 deletions

File tree

.github/workflows/maven-build.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
22
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
33

4-
name: Maven Package
4+
name: Maven Package build
55

6-
on: [ push, pull_request ]
6+
on: [ push, pull_request, workflow_dispatch ]
77

88
jobs:
99
build:
@@ -19,19 +19,10 @@ jobs:
1919
uses: actions/setup-java@v2
2020
with:
2121
java-version: '17'
22-
distribution: 'temurin'
23-
# server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
24-
# settings-path: ${{ github.workspace }}/settings.xml # location for the settings.xml file
22+
distribution: 'adopt'
2523

2624
- name: Build with Maven
2725
env:
28-
GH_MAVEN_REGISTRY_USER: ${{ secrets.PRIVATE_ACCESS_TOKEN_USER }}
29-
GH_MAVEN_REGISTRY_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
30-
run: mvn -s settings.xml install
31-
32-
- name: Deploy to registry
33-
env:
34-
GH_MAVEN_REGISTRY_USER: ${{ secrets.PRIVATE_ACCESS_TOKEN_USER }}
35-
GH_MAVEN_REGISTRY_ACCESS_TOKEN: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
36-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
run: mvn -s settings.xml deploy -DskipTests
26+
GH_MAVEN_REGISTRY_USER: ${{ secrets.GH_MAVEN_REGISTRY_USER }}
27+
GH_MAVEN_REGISTRY_ACCESS_TOKEN: ${{ secrets.GH_MAVEN_REGISTRY_ACCESS_TOKEN }}
28+
run: mvn -s settings.xml -B package
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3+
4+
name: Maven Package deploy
5+
6+
on:
7+
release:
8+
types: [ created ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v2
22+
with:
23+
java-version: '17'
24+
distribution: 'adopt'
25+
26+
- name: Build with Maven
27+
env:
28+
GH_MAVEN_REGISTRY_USER: ${{ secrets.GH_MAVEN_REGISTRY_USER }}
29+
GH_MAVEN_REGISTRY_ACCESS_TOKEN: ${{ secrets.GH_MAVEN_REGISTRY_ACCESS_TOKEN }}
30+
run: mvn -B package -s settings.xml
31+
32+
- name: Publish to GitHub Packages Apache Maven
33+
env:
34+
GH_MAVEN_REGISTRY_USER: ${{ secrets.GH_MAVEN_REGISTRY_USER }}
35+
GH_MAVEN_REGISTRY_ACCESS_TOKEN: ${{ secrets.GH_MAVEN_REGISTRY_ACCESS_TOKEN }}
36+
run: mvn deploy -s settings.xml

.gitlab-ci.yml

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

pom.xml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,21 @@
55
<packaging>jar</packaging>
66
<artifactId>globs-commandline</artifactId>
77
<name>Generic Lightweight ObjectS command line</name>
8-
<version>4.1-SNAPSHOT</version>
8+
<version>4.1.0</version>
99

1010
<repositories>
1111
<repository>
12-
<id>github-marc</id>
13-
<url>https://maven.pkg.github.com/MarcGuiot/*</url>
14-
</repository>
15-
<repository>
16-
<id>central</id>
17-
<url>https://repo1.maven.org/maven2</url>
12+
<id>github-globsframework</id>
13+
<url>https://maven.pkg.github.com/globsframework/*</url>
1814
</repository>
1915
</repositories>
2016

2117
<distributionManagement>
2218
<repository>
23-
<id>github</id>
19+
<id>github-globsframework</id>
2420
<name>GitHub Packages</name>
2521
<url>https://maven.pkg.github.com/${env.GITHUB_REPOSITORY}</url>
2622
</repository>
27-
<snapshotRepository>
28-
<id>github</id>
29-
<name>GitHub Packages</name>
30-
<url>https://maven.pkg.github.com/${env.GITHUB_REPOSITORY}</url>
31-
</snapshotRepository>
3223
</distributionManagement>
3324

3425
<build>
@@ -62,12 +53,13 @@
6253
<dependency>
6354
<groupId>org.globsframework</groupId>
6455
<artifactId>globs</artifactId>
65-
<version>4.1-SNAPSHOT</version>
56+
<version>4.1.0</version>
6657
</dependency>
6758
<!-- <dependency>-->
6859
<!-- <groupId>org.globsframework</groupId>-->
6960
<!-- <artifactId>globs-generate</artifactId>-->
70-
<!-- <version>4.1-SNAPSHOT</version>-->
61+
<!-- <version>4.1.0</version>-->
62+
<!-- <scope>test</scope>-->
7163
<!-- </dependency>-->
7264
<dependency>
7365
<groupId>junit</groupId>
@@ -81,7 +73,6 @@
8173
<version>2.20.0</version>
8274
<scope>test</scope>
8375
</dependency>
84-
8576
<dependency>
8677
<groupId>org.apache.logging.log4j</groupId>
8778
<artifactId>log4j-api</artifactId>

settings.xml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
<settings>
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
23
<servers>
34
<server>
4-
<id>github</id>
5-
<username>${env.GH_MAVEN_REGISTRY_USER}</username>
6-
<password>${env.GH_MAVEN_REGISTRY_ACCESS_TOKEN}</password>
7-
</server>
8-
<server>
9-
<id>github-marc</id>
5+
<id>github-globsframework</id>
106
<username>${env.GH_MAVEN_REGISTRY_USER}</username>
117
<password>${env.GH_MAVEN_REGISTRY_ACCESS_TOKEN}</password>
128
</server>

0 commit comments

Comments
 (0)