Skip to content

Commit 43e1784

Browse files
committed
Initial commit
1 parent e347e41 commit 43e1784

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish v2 snapshots to the Maven Central repository. Runs on merge to v2.
2+
on:
3+
pull_request:
4+
branches:
5+
- v2
6+
push:
7+
branches:
8+
- v2
9+
-
10+
workflow_dispatch: {}
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
16+
- name: Set up Maven Central Repository
17+
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
18+
with:
19+
distribution: 'corretto'
20+
java-version: 11
21+
server-id: ossrh
22+
server-username: MAVEN_USERNAME
23+
server-password: MAVEN_PASSWORD
24+
# TODO: use environments https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
25+
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} # Value of the GPG private key to import
26+
gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase
27+
- name: Publish package
28+
run: mvn -Prelease clean deploy -DskipTests
29+
env:
30+
MAVEN_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
31+
MAVEN_PASSWORD: fail_because_this_is_wrong
32+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)