diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..ec3ad16
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,27 @@
+name: Publish a release to the Maven Central Repository
+on: workflow_dispatch
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Maven Central Repository
+ uses: actions/setup-java@v4
+ with:
+ java-version: '8'
+ distribution: 'zulu'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ gpg-passphrase: GPG_PASSPHRASE
+ gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
+ - name: Configure Git User
+ run: |
+ git config user.email "actions@github.com"
+ git config user.name "GitHub Actions"
+ - name: Publish release
+ run: mvn -Dresume=false -Prelease -B -V -U release:prepare release:perform
+ env:
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
new file mode 100644
index 0000000..49c2f5c
--- /dev/null
+++ b/.github/workflows/snapshot.yml
@@ -0,0 +1,25 @@
+name: Publish a snapshot to the Maven Central Repository
+on:
+ push:
+ branches: [ "master" ]
+jobs:
+ snapshot:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Maven Central Repository
+ uses: actions/setup-java@v4
+ with:
+ java-version: '8'
+ distribution: 'zulu'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ gpg-passphrase: GPG_PASSPHRASE
+ gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
+ - name: Publish snapshot
+ run: mvn deploy -B -C -U -Dprod -Pstyle-enforcer
+ env:
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
\ No newline at end of file
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..0e92c20
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,21 @@
+name: Run tests on branch
+on: [push, pull_request]
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Maven Central Repository
+ uses: actions/setup-java@v4
+ with:
+ java-version: '8'
+ distribution: 'zulu'
+ - name: Cache Maven packages
+ uses: actions/cache@v4
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: Test package
+ run: mvn verify
diff --git a/pom.xml b/pom.xml
index 879d0a8..465f620 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,8 +23,8 @@
- scm:git:git@github.com:rapid7/presto-query-builder.git
- scm:git:git@github.com:rapid7/presto-query-builder.git
+ scm:git:https://github.com/rapid7/presto-query-builder.git
+ scm:git:https://github.com/rapid7/presto-query-builder.git
https://github.com/rapid7/presto-query-builder
HEAD
@@ -138,7 +138,7 @@
org.apache.maven.plugins
maven-gpg-plugin
- 1.5
+ 1.6
sign-artifacts
@@ -148,6 +148,13 @@
+
+
+
+ --pinentry-mode
+ loopback
+
+