-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.35 KB
/
deploy.yml
File metadata and controls
48 lines (41 loc) · 1.35 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Install Java and Maven
uses: actions/setup-java@v1
with:
java-version: 11
- name: Update version
run: |
mvn versions:set -DnewVersion=${{ github.event.release['name'] }}
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add ./pom.xml
git diff-index --quiet HEAD || git commit -m "release: bump maven version"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
- name: Deploy to GH actions
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mvn -s ./settings.xml deploy -U -Pgithub
- name: Deploy to NEXUS
uses: samuelmeuli/action-maven-publish@v1
with:
nexus_username: ${{ secrets.NEXUS_USERNAME }}
nexus_password: ${{ secrets.NEXUS_PASSWORD }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
maven_profiles: "nexus"