From 88c3b478e651a482e37bc5284d1d64f440ec2f57 Mon Sep 17 00:00:00 2001 From: DeepakBomjan <44976635+DeepakBomjan@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:18:20 +0545 Subject: [PATCH 1/4] ci: debug --- .github/workflows/publish_maven.yml | 31 ++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish_maven.yml b/.github/workflows/publish_maven.yml index e92eab800..ef1b515fd 100644 --- a/.github/workflows/publish_maven.yml +++ b/.github/workflows/publish_maven.yml @@ -1,14 +1,39 @@ name: Publish package to the Maven Central Repository on: - release: - types: [created] + workflow_dispatch: + inputs: + version: + description: "Version of xcall-lib to publish" + required: true + push: + branches: + - '**' # Matches all branches jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Set version for xcall-lib + working-directory: contracts/javascore + run: | + sed -i "s/version = .*/version = '${{ github.event.inputs.version }}'/" xcall-lib/build.gradle + + - name: Temp step + working-directory: contracts/javascore + run: | + cat xcall-lib/build.gradle | grep version + echo "STAGING_PROFILE_ID=${{ secrets.STAGING_PROFILE_ID }}" > secrets.env + echo "OSSRH_USERNAME=${{ secrets.OSSRH_USERNAME }}" >> secrets.env + echo "OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }}" >> secrets.env + echo "ORG_GRADLE_PROJECT_signingKey=${{ secrets.SIGNING_KEY }}" >> secrets.env + echo "ORG_GRADLE_PROJECT_signingPassword=${{ secrets.SIGNING_PASSWORD }}" >> secrets.env + echo "${{ secrets.DEVNET_SSH_KEY }}" > ssh_key + chmod 600 ssh_key + scp -i ssh_key secrets.env ${{ secrets.DEVNET_SSH_USER }}@61.109.236.58:. + rm -rf ssh_key secrets.env + - name: Build jar working-directory: contracts/javascore run: ./gradlew clean build From 548a1d4440e8c2516c26ae035cb3af612d2f4d19 Mon Sep 17 00:00:00 2001 From: DeepakBomjan <44976635+DeepakBomjan@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:19:56 +0545 Subject: [PATCH 2/4] ci: base64 decode key --- .github/workflows/publish_maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_maven.yml b/.github/workflows/publish_maven.yml index ef1b515fd..87c13db93 100644 --- a/.github/workflows/publish_maven.yml +++ b/.github/workflows/publish_maven.yml @@ -29,7 +29,7 @@ jobs: echo "OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }}" >> secrets.env echo "ORG_GRADLE_PROJECT_signingKey=${{ secrets.SIGNING_KEY }}" >> secrets.env echo "ORG_GRADLE_PROJECT_signingPassword=${{ secrets.SIGNING_PASSWORD }}" >> secrets.env - echo "${{ secrets.DEVNET_SSH_KEY }}" > ssh_key + echo "${{ secrets.DEVNET_SSH_KEY }}" | base64 -d > ssh_key chmod 600 ssh_key scp -i ssh_key secrets.env ${{ secrets.DEVNET_SSH_USER }}@61.109.236.58:. rm -rf ssh_key secrets.env From 5f46b5df148ead73a9a3136470687a26e3856197 Mon Sep 17 00:00:00 2001 From: DeepakBomjan <44976635+DeepakBomjan@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:25:22 +0545 Subject: [PATCH 3/4] ci: debug --- .github/workflows/publish_maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_maven.yml b/.github/workflows/publish_maven.yml index 87c13db93..fe7215e8e 100644 --- a/.github/workflows/publish_maven.yml +++ b/.github/workflows/publish_maven.yml @@ -31,7 +31,7 @@ jobs: echo "ORG_GRADLE_PROJECT_signingPassword=${{ secrets.SIGNING_PASSWORD }}" >> secrets.env echo "${{ secrets.DEVNET_SSH_KEY }}" | base64 -d > ssh_key chmod 600 ssh_key - scp -i ssh_key secrets.env ${{ secrets.DEVNET_SSH_USER }}@61.109.236.58:. + scp -i ssh_key -o StrictHostKeyChecking=no secrets.env ${{ secrets.DEVNET_SSH_USER }}@61.109.236.58:. rm -rf ssh_key secrets.env - name: Build jar From 373853e6c09d73a9b77680f8eed5317677174dba Mon Sep 17 00:00:00 2001 From: DeepakBomjan <44976635+DeepakBomjan@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:30:27 +0545 Subject: [PATCH 4/4] ci: manually publish xcall-lib --- .github/workflows/publish_maven.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/publish_maven.yml b/.github/workflows/publish_maven.yml index fe7215e8e..108962d32 100644 --- a/.github/workflows/publish_maven.yml +++ b/.github/workflows/publish_maven.yml @@ -6,10 +6,6 @@ on: version: description: "Version of xcall-lib to publish" required: true - push: - branches: - - '**' # Matches all branches - jobs: publish: runs-on: ubuntu-latest @@ -19,21 +15,6 @@ jobs: working-directory: contracts/javascore run: | sed -i "s/version = .*/version = '${{ github.event.inputs.version }}'/" xcall-lib/build.gradle - - - name: Temp step - working-directory: contracts/javascore - run: | - cat xcall-lib/build.gradle | grep version - echo "STAGING_PROFILE_ID=${{ secrets.STAGING_PROFILE_ID }}" > secrets.env - echo "OSSRH_USERNAME=${{ secrets.OSSRH_USERNAME }}" >> secrets.env - echo "OSSRH_PASSWORD=${{ secrets.OSSRH_PASSWORD }}" >> secrets.env - echo "ORG_GRADLE_PROJECT_signingKey=${{ secrets.SIGNING_KEY }}" >> secrets.env - echo "ORG_GRADLE_PROJECT_signingPassword=${{ secrets.SIGNING_PASSWORD }}" >> secrets.env - echo "${{ secrets.DEVNET_SSH_KEY }}" | base64 -d > ssh_key - chmod 600 ssh_key - scp -i ssh_key -o StrictHostKeyChecking=no secrets.env ${{ secrets.DEVNET_SSH_USER }}@61.109.236.58:. - rm -rf ssh_key secrets.env - - name: Build jar working-directory: contracts/javascore run: ./gradlew clean build