Skip to content

Commit ff78f28

Browse files
author
Marvin Zhang
committed
chore: Refactor GPG handling in GitHub Actions workflow
- 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.
1 parent a447792 commit ff78f28

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/publish.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,13 @@ jobs:
7878
env:
7979
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
8080

81-
- name: Set GPG_TTY
82-
run: export GPG_TTY=$(tty)
83-
8481
- name: Reload gpg-agent
8582
run: gpg-connect-agent reloadagent /bye
8683

8784
- name: Build and Test
8885
run: mvn clean test
8986

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

0 commit comments

Comments
 (0)