From cbfdf7bdc3cc9d189eacb9fce6b486d6dd8ea1f5 Mon Sep 17 00:00:00 2001 From: skyflow-vivek Date: Mon, 5 Jun 2023 15:37:37 +0530 Subject: [PATCH] SK-748 Beta Release Process for Java SDK --- .github/workflows/beta-release.yml | 33 ++++++++++++++++++++++++++++++ .github/workflows/release.yml | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/beta-release.yml diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml new file mode 100644 index 00000000..09c8ad90 --- /dev/null +++ b/.github/workflows/beta-release.yml @@ -0,0 +1,33 @@ +name: Publish beta package to the Maven Central Repository +on: + push: + tags: '*.*.*-beta.*' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Maven Central Repository + uses: actions/setup-java@v1 + with: + java-version: '1.8' + distribution: 'adopt' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase + + - name: create-json + id: create-json + uses: jsdaniell/create-json@1.1.2 + with: + name: "credentials.json" + json: ${{ secrets.TEST_CREDENTIALS_FILE_STRING }} + + - name: Publish package to Maven Central + run: mvn --batch-mode deploy + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02c7b612..5c1c6982 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Publish package to the Maven Central Repository on: push: - tags: '*.*.*' + tags: '[0-9]+.[0-9]+.[0-9]+' jobs: publish: runs-on: ubuntu-latest