Skip to content

Commit

Permalink
try fix java snapshot release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun committed Jun 25, 2023
1 parent 2619c2f commit 2de498e
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions .github/workflows/bindings_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
include:
- os: ubuntu-latest
classifier: linux-x86_64
# FIXME: Windows is not supported yet.
# FIXME: Windows is not supported due to 1password action limitation.
# - os: windows-latest
# classifier: windows-x86_64
- os: macos-latest
Expand All @@ -100,34 +100,20 @@ jobs:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
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: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
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: Local staging
working-directory: bindings/java
run: |
mvn -Papache-release package verify \
org.sonatype.plugins:nexus-staging-maven-plugin:deploy \
-DjniClassifier=${{ matrix.classifier }} \
-DskipTests=true \
-DaltStagingDirectory=local-staging \
-DskipRemoteStaging=true \
-DserverId=apache.snapshots.https \
-DnexusUrl=https://repository.apache.org
run: mvn -Papache-release package verify org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DjniClassifier=${{ matrix.classifier }} -DskipTests=true -DaltStagingDirectory=local-staging -DskipRemoteStaging=true
env:
MAVEN_USERNAME: ${{ secrets.NEXUS_USER }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_PW }}
MAVEN_GPG_PASSPHRASE: ${{ env.MAVEN_GPG_PASSPHRASE }}

- name: Upload local staging directory
Expand Down Expand Up @@ -209,11 +195,7 @@ jobs:
- name: Deploy local staged artifacts
if: ${{ github.event_name != 'pull_request' }}
working-directory: bindings/java
run: |
mvn org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged \
-DaltStagingDirectory=$LOCAL_STAGING_DIR \
-DserverId=apache.snapshots.https \
-DnexusUrl=https://repository.apache.org
run: mvn org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DaltStagingDirectory=$LOCAL_STAGING_DIR
env:
MAVEN_USERNAME: ${{ secrets.NEXUS_USER }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_PW }}
Expand Down

0 comments on commit 2de498e

Please sign in to comment.