Skip to content

Commit c5818cb

Browse files
committed
configure maven-gpg-plugin to prevent gpg from using PIN entry programs
1 parent 0c9f4d6 commit c5818cb

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
- name: Set up JDK
1313
uses: actions/setup-java@v3
1414
with:
15-
java-version: '22'
15+
java-version: '22' # or 11?
1616
distribution: 'temurin'
1717
server-id: ossrh
18-
server-username: MAVEN_USERNAME
19-
server-password: MAVEN_PASSWORD
18+
server-username: ${{secrets.OSSRH_USERNAME}}
19+
server-password: ${{secrets.OSSRH_TOKEN}}
2020

2121
- name: Download blosc jar
2222
run: |
@@ -32,7 +32,8 @@ jobs:
3232
gpg --list-secret-keys --keyid-format LONG
3333
3434
- name: Publish package
35-
run: mvn --batch-mode deploy
35+
# when working, add --no-transfer-progress
36+
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy
3637
env:
3738
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3839
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
</repository>
114114
</distributionManagement>
115115

116-
<!-- Repositories are not recommended (see https://maven.apache.org/repository/guide-central-repository-upload.html#faq-and-common-mistakes)-->
117116
<repositories>
118117
<repository>
119118
<id>unidata-all</id>
@@ -200,6 +199,12 @@
200199
<groupId>org.apache.maven.plugins</groupId>
201200
<artifactId>maven-gpg-plugin</artifactId>
202201
<version>1.6</version>
202+
<configuration>
203+
<gpgArguments>
204+
<arg>--pinentry-mode</arg>
205+
<arg>loopback</arg>
206+
</gpgArguments>
207+
</configuration>
203208
<executions>
204209
<execution>
205210
<id>sign-artifacts</id>

0 commit comments

Comments
 (0)