-
Notifications
You must be signed in to change notification settings - Fork 37
41 lines (36 loc) · 1.16 KB
/
main.yaml
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
name: build-main
on:
push:
branches: [develop, release-**]
pull_request:
branches: [develop, release-**]
jobs:
call-build:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Set POM version for dev branch
if: ${{ github.ref == 'refs/heads/develop' }}
run: echo "pomversion=$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set POM version for release branch
if: ${{ startsWith(github.ref, 'refs/heads/release-') }}
run: echo "pomversion=$(git describe --tags)" >> $GITHUB_ENV
- uses: ./.github/workflows/build
with:
mvn_goal: package
pom_version: ${{ env.pomversion }}
env:
MAVEN_USERNAME: ${{ secrets.PLATFORM_ARTIFACTORY_USER }}
MAVEN_USERPWD: ${{ secrets.PLATFORM_ARTIFACTORY_PWD }}
call-test:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/build
with:
mvn_goal: test