diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..abc17b0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Publish package to the Maven Central Repository +on: + push: + tags: + - vatchecker-* + pull_request: + branches: [ main ] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'adopt' + - name: Publish package + env: + JRELEASER_NEXUS2_USERNAME: ${{ secrets.JRELEASER_NEXUS2_USERNAME }} + JRELEASER_NEXUS2_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_PASSWORD }} + JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }} + JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }} + JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }} + JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./mvnw -Prelease deploy jreleaser:deploy -DaltDeploymentRepository=local::file:./target/staging-deploy \ No newline at end of file diff --git a/pom.xml b/pom.xml index c34c7e8..8b398a8 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,9 @@ 4.0.0 - - - org.sonatype.oss - oss-parent - 9 - + + 3.9.3 + ch.digitalfondue.vatchecker vatchecker @@ -52,7 +49,7 @@ junit junit - 4.13.1 + 4.13.2 test maven-resources-plugin - 3.0.2 + 3.3.1 maven-compiler-plugin - 3.7.0 + 3.12.1 maven-surefire-plugin - 2.22.0 + 3.2.5 maven-jar-plugin - 3.0.2 + 3.3.0 maven-install-plugin - 2.5.2 + 3.1.1 maven-deploy-plugin - 2.8.2 + 3.1.1 @@ -101,7 +98,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.6.3 11 -Xdoclint:none @@ -162,7 +159,7 @@ org.jacoco jacoco-maven-plugin - 0.8.5 + 0.8.11 prepare-agent @@ -174,4 +171,65 @@ + + + release + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.6.3 + + + attach-javadoc + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-source + + jar + + + + + + org.jreleaser + jreleaser-maven-plugin + 1.10.0 + + + + ALWAYS + true + + + + + + ALWAYS + https://oss.sonatype.org/service/local; + true + true + target/staging-deploy + + + + + + + + + + + diff --git a/src/main/java/ch/digitalfondue/vatchecker/Utils.java b/src/main/java/ch/digitalfondue/vatchecker/Utils.java index 6408d6e..d5d0dcd 100644 --- a/src/main/java/ch/digitalfondue/vatchecker/Utils.java +++ b/src/main/java/ch/digitalfondue/vatchecker/Utils.java @@ -1,6 +1,6 @@ /* * - * Copyright © 2018-2021 digitalfondue (info@digitalfondue.ch) + * Copyright © 2018-2024 digitalfondue (info@digitalfondue.ch) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..bf0778e --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,20 @@ +/* + * + * Copyright © 2018-2024 digitalfondue (info@digitalfondue.ch) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module ch.digitalfondue.vatchecker { + exports ch.digitalfondue.vatchecker; + requires java.xml; +} \ No newline at end of file diff --git a/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java b/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java index dacd433..70622ed 100644 --- a/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java +++ b/src/test/java/ch/digitalfondue/vatchecker/EUVatCheckerTest.java @@ -1,6 +1,6 @@ /* * - * Copyright © 2018-2021 digitalfondue (info@digitalfondue.ch) + * Copyright © 2018-2024 digitalfondue (info@digitalfondue.ch) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.