diff --git a/.github/release/maven-settings.xml.gpg b/.github/release/maven-settings.xml.gpg deleted file mode 100644 index d259876..0000000 Binary files a/.github/release/maven-settings.xml.gpg and /dev/null differ diff --git a/.github/release/smallrye-sign.asc.gpg b/.github/release/smallrye-sign.asc.gpg deleted file mode 100644 index ffd7b0f..0000000 Binary files a/.github/release/smallrye-sign.asc.gpg and /dev/null differ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29858b1..67b74f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,20 +30,26 @@ jobs: with: distribution: 'temurin' java-version: 11 + server-id: 'oss.sonatype' + server-username: 'MAVEN_DEPLOY_USERNAME' + server-password: 'MAVEN_DEPLOY_TOKEN' + gpg-private-key: ${{secrets.MAVEN_GPG_PRIVATE_KEY}} + gpg-passphrase: 'MAVEN_GPG_PASSPHRASE' - name: maven release ${{steps.metadata.outputs.current-version}} + env: + MAVEN_DEPLOY_USERNAME: ${{secrets.MAVEN_DEPLOY_USERNAME}} + MAVEN_DEPLOY_TOKEN: ${{secrets.MAVEN_DEPLOY_TOKEN}} + MAVEN_GPG_PASSPHRASE: ${{secrets.MAVEN_GPG_PASSPHRASE}} run: | java -version - gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.SECRET_PASSPHRASE}}" --output smallrye-sign.asc .github/release/smallrye-sign.asc.gpg - gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.SECRET_PASSPHRASE}}" --output maven-settings.xml .github/release/maven-settings.xml.gpg - gpg --fast-import --no-tty --batch --yes smallrye-sign.asc git config --global user.name "SmallRye CI" git config --global user.email "smallrye@googlegroups.com" git checkout -b release - mvn -B release:prepare -Prelease,coverage -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s maven-settings.xml + mvn -B release:prepare -Prelease,coverage -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} git checkout ${{github.base_ref}} git rebase release - mvn -B release:perform -Prelease -s maven-settings.xml + mvn -B release:perform -Prelease git push git push --tags