-
Notifications
You must be signed in to change notification settings - Fork 40
38 lines (33 loc) · 1.32 KB
/
cd_build.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
name: Continous Delivery
on:
push:
branches: [master]
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-package: jdk
java-version: 21
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
cache: 'maven'
- name: Build, publish to GPR and tag
run: |
if [ "$GITHUB_REPOSITORY" == "gruelbox/transaction-outbox" ]; then
revision="5.3.$GITHUB_RUN_NUMBER"
echo "Building $revision at $GITHUB_SHA"
mvn -Pconcise,delombok -B deploy -s $GITHUB_WORKSPACE/settings.xml -Drevision="$revision" -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
echo "Tagging $revision"
git tag $revision
git push origin $revision
else
mvn -Pconcise,delombok -B package -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
fi
env:
GITHUB_TOKEN: ${{ github.token }}