Skip to content

Commit fb09285

Browse files
Merge pull request #9 from AfterShip-Team-Mocha/2025-01
feat: supported 2025-01 API version.
2 parents f6c032e + 709aa0c commit fb09285

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/maven-publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will build a Java project with Maven
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Maven Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Maven Central Repository
16+
uses: actions/setup-java@v2
17+
with:
18+
java-version: '8'
19+
distribution: 'adopt'
20+
server-id: ossrh
21+
server-username: MAVEN_USERNAME
22+
server-password: MAVEN_PASSWORD
23+
- id: install-secret-key
24+
name: Install gpg secret key
25+
run: |
26+
cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import
27+
gpg --list-secret-keys --keyid-format LONG
28+
- name: Publish package
29+
env:
30+
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
31+
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
32+
run: mvn --no-transfer-progress --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean deploy

0 commit comments

Comments
 (0)