diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..861260e --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,7 @@ +@MathieuSoysal @emerick-biron + +*.java @MathieuSoysal @emerick-biron + +pom.xml @MathieuSoysal + +.github/** @MathieuSoysal \ No newline at end of file diff --git a/.github/workflows/maven-package.yml b/.github/workflows/maven-package.yml new file mode 100644 index 0000000..5002f3c --- /dev/null +++ b/.github/workflows/maven-package.yml @@ -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 }} diff --git a/pom.xml b/pom.xml index d70d879..a5899e2 100644 --- a/pom.xml +++ b/pom.xml @@ -55,8 +55,8 @@ - MIT License - http://www.opensource.org/licenses/mit-license.php + Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt @@ -70,35 +70,58 @@ Mathieu SOYSAL Mathieu.Soysal@outlook.fr + https://MathieuSoysal.me/ com.github.devlab-umontp https://github.com/DevLab-umontp + + github + https://github.com/DevLab-umontp/Librarie-Java-EDT/issues + + scm:git:git://github.com/DevLab-umontp/API-JAVA-EDT.git scm:git:ssh://github.com:DevLab-umontp/API-JAVA-EDT.git http://github.com/DevLab-umontp/API-JAVA-EDT - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - Sonatype - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - + + - release + ossrhDeploy + + + + ossrh + Central Repository OSSRH + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + Central Repository OSSRH + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://oss.sonatype.org/ + true + + + org.apache.maven.plugins maven-source-plugin @@ -107,11 +130,12 @@ attach-sources - jar + jar-no-fork + org.apache.maven.plugins maven-javadoc-plugin @@ -125,6 +149,7 @@ + org.apache.maven.plugins maven-gpg-plugin @@ -136,26 +161,48 @@ sign + + + --pinentry-mode + loopback + + + + + + + githubDeploy + + + github + GitHub DevLab-umontp Apache Maven Packages + https://maven.pkg.github.com/DevLab-umontp/Librarie-Java-EDT + + + + org.apache.maven.plugins maven-surefire-plugin 3.0.0-M5 + org.apache.maven.plugins maven-failsafe-plugin 3.0.0-M5 + org.apache.maven.plugins maven-compiler-plugin @@ -166,17 +213,7 @@ ${project.build.sourceEncoding} - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - true - - ossrh - https://oss.sonatype.org/ - true - - + org.jacoco jacoco-maven-plugin @@ -197,6 +234,7 @@ +