-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.51 KB
/
java-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Java Release
on:
workflow_dispatch:
secrets:
GPG_PRIVATE_KEY:
required: true
SONATYPE_PW:
required: true
SONATYPE_USER:
required: true
GPG_PASSPHRASE:
required: true
env:
CARGO_TERM_COLOR: always
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fregante/setup-git-user@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build Docker Image
run: docker build . -t build-image
- name: Make shared libs
run: docker run --rm -v$(pwd):/polymath build-image make
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Sync Java Version
run: cargo xtask polymath-java sync-version
- name: Build with Maven
run: cd polymath-java && mvn -B clean deploy -Pci-cd
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USER }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PW }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}