-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.27 KB
/
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
name: Builds and publishes All relevant objects
on:
push:
branches:
- '**' # matches every branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'zulu'
cache: 'maven'
- uses: stCarolas/[email protected]
with:
maven-version: 3.9.6
- name: Clean branch name
run: |
BRANCH_NAME=${{github.ref_name}}
CLEAN_BRANCH_NAME=$(echo $BRANCH_NAME | sed 's/[\/_]/-/g')
echo "Cleaned branch name: $CLEAN_BRANCH_NAME"
echo CLEAN_BRANCH_NAME=$CLEAN_BRANCH_NAME >> $GITHUB_ENV
- name: Sets up version
working-directory: packager
run: mvn versions:set -DnewVersion=${{env.CLEAN_BRANCH_NAME}}.${{github.run_number}}
- name: Builds Artifacts and Images
working-directory: packager
run: mvn clean install
- name: Archive Hypertension Package
uses: actions/upload-artifact@v4
with:
name: Dhis2HypertensionPackage-${{env.CLEAN_BRANCH_NAME}}.${{github.run_number}}-package.zip
path: packager/target/Dhis2HypertensionPackage-${{env.CLEAN_BRANCH_NAME}}.${{github.run_number}}-package.zip