Skip to content

Commit

Permalink
chore: Refactor GPG handling in GitHub Actions workflow
Browse files Browse the repository at this point in the history
- Moved the setting of GPG_TTY to the build command to ensure proper environment variable handling during deployment.
- Removed the separate GPG_TTY setup step to streamline the workflow.
- Maintained the overall efficiency and clarity of GPG key management in the deployment process.
  • Loading branch information
Marvin Zhang committed Jan 3, 2025
1 parent a447792 commit ff78f28
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,13 @@ jobs:
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Set GPG_TTY
run: export GPG_TTY=$(tty)

- name: Reload gpg-agent
run: gpg-connect-agent reloadagent /bye

- name: Build and Test
run: mvn clean test

- name: Build and Publish to Maven Central and GitHub Packages
run: mvn clean deploy -P ossrh,github -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
run: |
export GPG_TTY=$(tty)
mvn clean deploy -P ossrh,github -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}

0 comments on commit ff78f28

Please sign in to comment.