-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (33 loc) · 1.12 KB
/
maven.yml
File metadata and controls
33 lines (33 loc) · 1.12 KB
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
name: Publish package to the Maven Central Repository
on: workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: trunk
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven
restore-keys: ${{ runner.os }}-maven
- name: Set up JBoss Staging Repository
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
server-id: jboss-staging
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Set Git User Info
run: |
git config --global user.email 'rhc-na-app-dev-practice@redhat.com'
git config --global user.name "GitHub Actions"
- name: Maven Release
run: |
mvn -B release:prepare release:perform -Dpassword="${{ github.token }}" -DtagNameFormat="r@{project.version}"
env:
MAVEN_USERNAME: ${{ secrets.NEXUS_USER }}
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}