8
8
name : Create new branch
9
9
env :
10
10
ENVIRONMENT : CI
11
- runs-on : ubuntu-latest
11
+ runs-on : ubuntu-latest
12
12
13
13
steps :
14
14
- uses : actions/checkout@v4
@@ -20,32 +20,32 @@ jobs:
20
20
distribution : ' adopt'
21
21
java-version : 17
22
22
- name : install yq
23
- run : wget https://github.com/mikefarah/yq/releases/download/v4.2.0/yq_linux_amd64 -O ~/yq && chmod +x ~/yq
23
+ run : wget https://github.com/mikefarah/yq/releases/download/v4.2.0/yq_linux_amd64 -O ~/yq && chmod +x ~/yq
24
24
- name : Maven Version
25
25
run : mvn --version
26
26
# Retrieve current version from the root pom
27
27
- name : Get version
28
28
run : |
29
29
PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.4.0:evaluate -Dexpression=project.version -q -DforceStdout)
30
30
echo PROJECT_VERSION=${PROJECT_VERSION} >> $GITHUB_ENV
31
- echo CUR_VERSION=$(echo ${PROJECT_VERSION} | awk -F'.' '{print $1"."$2+0"."$3}' | sed s/[.]$//) >> $GITHUB_ENV
32
- echo NEXT_VERSION=$(echo ${PROJECT_VERSION} | awk -F'.' '{print $1"."$2+1}' | sed s/[.]$//) >> $GITHUB_ENV
31
+ echo CUR_VERSION=$(echo ${PROJECT_VERSION} | awk -F'.' '{print $1"."$2+0"."$3}' | sed s/[.]$//) >> $GITHUB_ENV
32
+ echo NEXT_VERSION=$(echo ${PROJECT_VERSION} | awk -F'.' '{print $1"."$2+1}' | sed s/[.]$//) >> $GITHUB_ENV
33
33
- name : Create branch ${{ env.CUR_VERSION }}
34
34
run : git branch ${{ env.CUR_VERSION }} master
35
35
- name : Bump next version ${{ env.NEXT_VERSION }}-SNAPSHOT
36
- run : mvn versions:set -DnewVersion=${{ env.NEXT_VERSION }}-SNAPSHOT
36
+ run : mvn -B -ntp versions:set -DnewVersion=${{ env.NEXT_VERSION }}-SNAPSHOT
37
37
- name : Set major version ${{ env.NEXT_VERSION }}
38
- run : mvn versions:set-property -Dproperty=major-version -DnewVersion=${{ env.NEXT_VERSION }}
38
+ run : mvn -B -ntp versions:set-property -Dproperty=major-version -DnewVersion=${{ env.NEXT_VERSION }}
39
39
- name : Update main workflow
40
- run : ~/yq -i e '.on.push.branches |= [ "master", '${{ env.CUR_VERSION }}' ]' .github/workflows/main.yml
40
+ run : ~/yq -i e '.on.push.branches |= [ "master", '${{ env.CUR_VERSION }}' ]' .github/workflows/main.yml
41
41
- name : Update release branch
42
- run : ~/yq -i e '.env.RELEASE_BRANCH |= '${{ env.CUR_VERSION }} .github/workflows/release.yml
42
+ run : ~/yq -i e '.env.RELEASE_BRANCH |= '${{ env.NEXT_VERSION }} .github/workflows/release.yml
43
43
- name : Update Notify clients workflow
44
- run : ~/yq -i e '.on.push.branches |= [ "master", '${{ env.CUR_VERSION }}' ]' .github/workflows/notify-clients.yaml
44
+ run : ~/yq -i e '.on.push.branches |= [ "master", '${{ env.CUR_VERSION }}' ]' .github/workflows/notify-clients.yaml
45
45
- name : Update backport workflow
46
- run : ~/yq -i e '.jobs.backporting.steps[1].with.target-branch |= '${{ env.CUR_VERSION }} .github/workflows/backport.yml
46
+ run : ~/yq -i e '.jobs.backporting.steps[1].with.target-branch |= '${{ env.CUR_VERSION }} .github/workflows/backport.yml
47
47
- name : build new openapi.yaml
48
- run : mvn clean package -DskipTests -DskipITs -pl horreum-api
48
+ run : mvn -B -ntp clean package -DskipTests -DskipITs -pl horreum-api
49
49
- name : Configure git
50
50
run : |
51
51
git config --global user.name "rh-appservices-perf"
56
56
- name : Update cur branch
57
57
run : |
58
58
git checkout ${{ env.CUR_VERSION }}
59
- mvn versions:set -DnewVersion=${{ env.CUR_VERSION }}.0-SNAPSHOT
59
+ mvn -B -ntp versions:set -DnewVersion=${{ env.CUR_VERSION }}.0-SNAPSHOT
60
60
- name : Commit current release branch
61
61
run : |
62
62
git commit -a -m "Branching ${{ env.CUR_VERSION }}"
0 commit comments