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 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