Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@MathieuSoysal @emerick-biron

*.java @MathieuSoysal @emerick-biron

pom.xml @MathieuSoysal

.github/** @MathieuSoysal
54 changes: 54 additions & 0 deletions .github/workflows/maven-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Maven Package

on:
release:
types: [created]

jobs:
publish:

runs-on: ubuntu-latest

env:
artifact_name: edt-iut-umontp

steps:
- uses: actions/checkout@v2

- name: Get the release version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}

- name: Set up JDK 11 for deploy to OSSRH
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Update package version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}

- name: Publish to Apache Maven Central
run: mvn deploy -PossrhDeploy
env:
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Set up JDK 11 for deploy to github packages
uses: actions/setup-java@v1
with:
java-version: 11
server-id: github

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -PgithubDeploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92 changes: 65 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<name>Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

Expand All @@ -70,35 +70,58 @@
<developer>
<name>Mathieu SOYSAL</name>
<email>Mathieu.Soysal@outlook.fr</email>
<url>https://MathieuSoysal.me/</url>
<organization>com.github.devlab-umontp</organization>
<organizationUrl>https://github.com/DevLab-umontp</organizationUrl>
</developer>
</developers>

<issueManagement>
<system>github</system>
<url>https://github.com/DevLab-umontp/Librarie-Java-EDT/issues</url>
</issueManagement>

<scm>
<connection>scm:git:git://github.com/DevLab-umontp/API-JAVA-EDT.git</connection>
<developerConnection>scm:git:ssh://github.com:DevLab-umontp/API-JAVA-EDT.git</developerConnection>
<url>http://github.com/DevLab-umontp/API-JAVA-EDT</url>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Sonatype</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>


<profiles>

<!-- Porfil : Maven Centrale -->
<profile>
<id>release</id>
<id>ossrhDeploy</id>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<build>
<plugins>

<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -107,11 +130,12 @@
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand All @@ -125,6 +149,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -136,26 +161,48 @@
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
</profile>

<!-- Profil : Github Apache Maven Packages -->
<profile>
<id>githubDeploy</id>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub DevLab-umontp Apache Maven Packages</name>
<url>https://maven.pkg.github.com/DevLab-umontp/Librarie-Java-EDT</url>
</repository>
</distributionManagement>
</profile>
</profiles>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -166,17 +213,7 @@
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Expand All @@ -197,6 +234,7 @@
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>