diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33b9f73..6b9fa73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,9 +25,32 @@ jobs: java-version: '8' distribution: 'zulu' cache: 'maven' + server-id: ossrh + server-username: OSSRH_JIRA_USERNAME + server-password: OSSRH_JIRA_PASSWORD + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: GPG_PASSPHRASE - name: Build with Maven run: mvn clean test jacoco:report - name: Upload To Codecov uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 20 + + - name: Semantic Release + run: | + npm install -g @conveyal/maven-semantic-release semantic-release + semantic-release --prepare @conveyal/maven-semantic-release --publish @semantic-release/github,@conveyal/maven-semantic-release --verify-conditions @semantic-release/github,@conveyal/maven-semantic-release --verify-release @conveyal/maven-semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }} + OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }} diff --git a/pom.xml b/pom.xml index 31ee887..503a417 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt + https://www.apache.org/licenses/LICENSE-2.0.txt repo @@ -58,6 +58,19 @@ + + + org.sonatype.central + central-publishing-maven-plugin + 0.5.0 + true + + ossrh + true + + true + + org.apache.maven.plugins maven-source-plugin @@ -126,12 +139,8 @@ ossrh - https://oss.sonatype.org/content/repositories/snapshots/ + https://central.sonatype.com - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ -