From f4c0a46472d712ecd60e042ea16b7ed5d4c48599 Mon Sep 17 00:00:00 2001 From: daniel-y Date: Sun, 8 Oct 2023 14:39:53 +0800 Subject: [PATCH] chore: add a github action to release the snapshot version of s3stream Signed-off-by: daniel-y --- .github/workflows/s3stream-snap.yml | 27 +++++++++++++++++++++++++++ pom.xml | 15 ++++++++------- 2 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/s3stream-snap.yml diff --git a/.github/workflows/s3stream-snap.yml b/.github/workflows/s3stream-snap.yml new file mode 100644 index 000000000..a48b22a1b --- /dev/null +++ b/.github/workflows/s3stream-snap.yml @@ -0,0 +1,27 @@ +name: Deploy Snapshot of S3Stream +on: + push: + branches: + - 'main' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - run: echo "Will start a Maven Central upload with current version" + - uses: actions/checkout@v2 + - name: Set up Maven Central Repository + uses: actions/setup-java@v1 + with: + java-version: 17 + server-id: oss.sonatype.org + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Publish package + working-directory: s3stream + run: mvn --batch-mode clean deploy -P central-deploy -DskipTests=true + env: + MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index f8e2f8729..99a6f5c9d 100644 --- a/pom.xml +++ b/pom.xml @@ -273,13 +273,14 @@ - - - snapshot + + + oss.sonatype.org https://s01.oss.sonatype.org/content/repositories/snapshots - - true - + + + oss.sonatype.org + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - + \ No newline at end of file