Skip to content

Commit 575dbe8

Browse files
authored
devops: add publish action (#137)
1 parent e7224b6 commit 575dbe8

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [ published ]
5+
6+
jobs:
7+
build:
8+
timeout-minutes: 30
9+
strategy:
10+
fail-fast: false
11+
runs-on: ${{ matrix.os }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: microsoft/playwright-github-action@v1
15+
- name: Set up JDK 1.8
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 1.8
19+
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
20+
server-username: MAVEN_USERNAME # env variable for username in deploy
21+
server-password: MAVEN_PASSWORD # env variable for token in deploy
22+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
23+
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
24+
- name: Download drivers
25+
shell: bash
26+
run: scripts/download_driver_for_all_platforms.sh
27+
- name: Publish to Maven Central
28+
run: mvn deploy --batch-mode -D skipTests --activate-profiles release --no-transfer-progress
29+
env:
30+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
31+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@
168168
<goals>
169169
<goal>sign</goal>
170170
</goals>
171+
<configuration>
172+
<!-- Prevent `gpg` from using pinentry programs -->
173+
<gpgArguments>
174+
<arg>--pinentry-mode</arg>
175+
<arg>loopback</arg>
176+
</gpgArguments>
177+
</configuration>
171178
</execution>
172179
</executions>
173180
</plugin>

0 commit comments

Comments
 (0)