You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/06/25 03:17:45 UTC

[incubator-opendal] branch fix-java-snapshot updated: Remove trick

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch fix-java-snapshot
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/fix-java-snapshot by this push:
     new 8cf84863b Remove trick
8cf84863b is described below

commit 8cf84863b5a07cf2d1898372193edaa98a76b723
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Sun Jun 25 11:17:32 2023 +0800

    Remove trick
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 .github/workflows/bindings_java.yml | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/.github/workflows/bindings_java.yml b/.github/workflows/bindings_java.yml
index f98f044e2..669f66461 100644
--- a/.github/workflows/bindings_java.yml
+++ b/.github/workflows/bindings_java.yml
@@ -94,29 +94,17 @@ jobs:
           export-env: true
         env:
           OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
-          MAVEN_GPG_PRIVATE_KEY_BASE64: op://services/maven/gpg_private_key
+          MAVEN_GPG_PRIVATE_KEY: op://services/maven/gpg_private_key
           MAVEN_GPG_PASSPHRASE: op://services/maven/gpg_passphrase
           MAVEN_GPG_KEY_ID: op://services/maven/gpg_key_id
 
-      - name: Decode GPG private key
-        id: key
-        run: |
-          private_key=$(echo "${MAVEN_GPG_PRIVATE_KEY_BASE64}" | base64 -d)
-
-          # Mask
-          while read -r line;
-          do
-            echo "::add-mask::${line}"
-          done <<< "${private_key}"
-
-          echo ${private_key} | gpg --import -
-
       - name: Set up JDK 8
         uses: actions/setup-java@v3
         with:
           distribution: 'temurin'
           java-version: '8'
           cache: 'maven'
+          gpg-private-key: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
           gpg-passphrase: MAVEN_GPG_PASSPHRASE
       - uses: actions/setup-python@v4
         with:
@@ -147,21 +135,9 @@ jobs:
           export-env: true
         env:
           OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
-          MAVEN_GPG_PRIVATE_KEY_BASE64: op://services/maven/gpg_private_key
+          MAVEN_GPG_PRIVATE_KEY: op://services/maven/gpg_private_key
           MAVEN_GPG_PASSPHRASE: op://services/maven/gpg_passphrase
 
-      - name: Decode GPG private key
-        run: |
-          private_key=$(echo "${MAVEN_GPG_PRIVATE_KEY_BASE64}" | base64 -d)
-
-          # Mask
-          while read -r line;
-          do
-            echo "::add-mask::${line}"
-          done <<< "${private_key}"
-
-          echo ${private_key} | gpg --import -
-
       - name: Set up JDK 8
         uses: actions/setup-java@v3
         with:
@@ -171,6 +147,7 @@ jobs:
           server-id: apache.snapshots.https
           server-username: MAVEN_USERNAME
           server-password: MAVEN_CENTRAL_TOKEN
+          gpg-private-key: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
           gpg-passphrase: MAVEN_GPG_PASSPHRASE
 
       - name: Prepare enviroment variables