-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.51 KB
/
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
56
name: Release-Build
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v8
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
server-id: github
- name: Configure Git
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
git checkout -b new-release
- name: Provide maven repository credentials
uses: s4u/maven-settings-action@v2
with:
servers: |
[{
"id": "nexus.axonivy.com",
"username": "${{ secrets.NEXUS_AXONIVY_COM_USER }}",
"password": "${{ secrets.NEXUS_AXONIVY_COM_PASSWORD }}"
}]
- name: Setup Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.8
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --batch-mode -Darguments="-Dmaven.test.skip=true -DaltDeploymentRepository=nexus.axonivy.com::https://nexus.axonivy.com/repository/maven-releases/" release:prepare release:perform
- name: Create pull request
uses: repo-sync/pull-request@v2
with:
destination_branch: ${{ steps.branch-name.outputs.current_branch }}
source_branch: new-release
pr_title: "Release"
github_token: ${{ secrets.GITHUB_TOKEN }}