From debcd2801914d3fb524f5667a240e57d2facc27e Mon Sep 17 00:00:00 2001 From: Waldemar Hummer Date: Tue, 20 Dec 2022 22:26:04 +0100 Subject: [PATCH 1/2] add pipeline config to create Maven releases --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9cec2f..37ca3fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: CI +name: CI Build on: push: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f5ec657 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Maven Release + +on: + workflow_dispatch: + +jobs: + build: + name: Release to Maven Central + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + distribution: "adopt" + java-version: "8" + + - name: Set up credentials + env: + MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_KEY }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + run: | + mkdir -p ~/.m2 + cat < ~/.m2/settings.xml + + + + ossrh + ${MAVEN_USERNAME} + ${MAVEN_PASSWORD} + + + + EOT + + export GPG_TTY=$(tty) + echo -e "$MAVEN_GPG_KEY" | sed 's/\$/\n/' > /tmp/maven.gpg + gpg --no-tty --pinentry-mode loopback --passphrase $MAVEN_GPG_PASSPHRASE --import /tmp/maven.gpg + gpg -ab --no-tty --pinentry-mode loopback --passphrase $MAVEN_GPG_PASSPHRASE /tmp/maven.gpg + + - name: Maven Publish + run: make publish-maven From 6bd0d03bbbfba4b80a5fefa42301f1d44c244b77 Mon Sep 17 00:00:00 2001 From: Waldemar Hummer Date: Wed, 21 Dec 2022 10:39:23 +0100 Subject: [PATCH 2/2] add note on Maven release pipeline to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b4b6da0..045f320 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,10 @@ To build the latest version of the code via Maven: make build ``` +### Releasing + +To publish a release of the library, the "Maven Release" Github Action can be manually triggered in the repository, which will take the latest code on `master` branch and publish it to Maven Central. + ## Change Log * v0.2.22: Fix sqs event mapping for new event format, some test fixes