Skip to content

Commit bb48d74

Browse files
AAE-26208 Workflow adjustments (#2346)
* AAE-26208 skipping generation of backup version * AAE-26208 version from the pom, not branch name
1 parent ef04ddb commit bb48d74

File tree

3 files changed

+19
-23
lines changed

3 files changed

+19
-23
lines changed

.github/workflows/build.yml

+14-16
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
push:
55
branches:
66
- develop
7-
- release/**
87
pull_request:
98
branches:
109
- develop
11-
- release/**
1210
types:
1311
- opened
1412
- reopened
@@ -69,22 +67,22 @@ jobs:
6967
runs-on: ubuntu-latest
7068
needs:
7169
- build
72-
if: github.event_name == 'push'
73-
env:
74-
VERSION: ${{ needs.build.outputs.version }}
75-
DEVELOPMENT_BRANCH: ${{ github.ref_name }}
70+
if: github.event_name == 'push' && startsWith(github.ref_name, 'release/')
7671
steps:
7772
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
78-
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-helm-docs@209bb4275688720e13dc0703dbd17826bf677c5c # v6.1.0
79-
- uses: Alfresco/alfresco-build-tools/.github/actions/jx-updatebot-pr@209bb4275688720e13dc0703dbd17826bf677c5c # v6.1.0
80-
with:
81-
version: ${{ needs.build.outputs.version }}
82-
auto-merge: 'true'
83-
labels: 'be-propagation,${{ env.DEVELOPMENT_BRANCH }}'
84-
base-branch-name: ${{ env.DEVELOPMENT_BRANCH }}
85-
git-username: ${{ secrets.BOT_GITHUB_USERNAME }}
86-
git-token: ${{ secrets.BOT_GITHUB_TOKEN }}
87-
git-author-name: ${{ secrets.BOT_GITHUB_USERNAME }}
73+
- name: Extract version from branch name
74+
id: extract_version
75+
run: |
76+
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
77+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
78+
echo "::set-output name=version::$VERSION"
79+
80+
- name: Create gh Release
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
83+
VERSION: ${{ env.VERSION }}
84+
run: |
85+
gh release create ${VERSION} --title ${VERSION} --notes "Release ${VERSION}" --target ${{ github.sha }}
8886
8987
notify:
9088
runs-on: ubuntu-latest

.github/workflows/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ jobs:
6565
6666
- name: Update versions in pom.xml
6767
run: |
68-
mvn versions:set-property -Dproperty=alfresco-deployment-service.version -DnewVersion=${{ github.event.inputs.alfresco-deployment-service-version }}
69-
mvn versions:set-property -Dproperty=alfresco-modeling-service.version -DnewVersion=${{ github.event.inputs.alfresco-modeling-service-version }}
70-
mvn versions:set-property -Dproperty=alfresco-process.version -DnewVersion=${{ github.event.inputs.alfresco-process-version }}
71-
mvn versions:set-property -Dproperty=activiti-cloud.version -DnewVersion=${{ github.event.inputs.activiti-cloud-version }}
72-
mvn versions:set -DnewVersion=${{ github.event.inputs.tag-name }}
68+
mvn versions:set-property -Dproperty=alfresco-deployment-service.version -DnewVersion=${{ github.event.inputs.alfresco-deployment-service-version }} -DgenerateBackupPoms=false
69+
mvn versions:set-property -Dproperty=alfresco-modeling-service.version -DnewVersion=${{ github.event.inputs.alfresco-modeling-service-version }} -DgenerateBackupPoms=false
70+
mvn versions:set-property -Dproperty=alfresco-process.version -DnewVersion=${{ github.event.inputs.alfresco-process-version }} -DgenerateBackupPoms=false
71+
mvn versions:set-property -Dproperty=activiti-cloud.version -DnewVersion=${{ github.event.inputs.activiti-cloud-version }} -DgenerateBackupPoms=false
72+
mvn versions:set -DnewVersion=${{ github.event.inputs.tag-name }} -DgenerateBackupPoms=false
7373
7474
- name: Commit Changes
7575
env:

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,3 @@ alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib/generated/alfresco-act
7979
!alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib/generated/alfresco-activiti-script-modeling-rest-api/pom.xml
8080
alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib/generated/alfresco-activiti-admin-preference-rest-api/*
8181
!alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib/generated/alfresco-activiti-admin-preference-rest-api/pom.xml
82-
83-
*.pom.xml.versionsBackup

0 commit comments

Comments
 (0)