Skip to content

Commit

Permalink
AAE-26208 Workflow adjustments (#2346)
Browse files Browse the repository at this point in the history
* AAE-26208 skipping generation of backup version
* AAE-26208 version from the pom, not branch name
  • Loading branch information
wojciech-piotrowiak authored Oct 10, 2024
1 parent ef04ddb commit bb48d74
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- develop
- release/**
pull_request:
branches:
- develop
- release/**
types:
- opened
- reopened
Expand Down Expand Up @@ -69,22 +67,22 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
if: github.event_name == 'push'
env:
VERSION: ${{ needs.build.outputs.version }}
DEVELOPMENT_BRANCH: ${{ github.ref_name }}
if: github.event_name == 'push' && startsWith(github.ref_name, 'release/')
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-helm-docs@209bb4275688720e13dc0703dbd17826bf677c5c # v6.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/jx-updatebot-pr@209bb4275688720e13dc0703dbd17826bf677c5c # v6.1.0
with:
version: ${{ needs.build.outputs.version }}
auto-merge: 'true'
labels: 'be-propagation,${{ env.DEVELOPMENT_BRANCH }}'
base-branch-name: ${{ env.DEVELOPMENT_BRANCH }}
git-username: ${{ secrets.BOT_GITHUB_USERNAME }}
git-token: ${{ secrets.BOT_GITHUB_TOKEN }}
git-author-name: ${{ secrets.BOT_GITHUB_USERNAME }}
- name: Extract version from branch name
id: extract_version
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
echo "::set-output name=version::$VERSION"
- name: Create gh Release
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
VERSION: ${{ env.VERSION }}
run: |
gh release create ${VERSION} --title ${VERSION} --notes "Release ${VERSION}" --target ${{ github.sha }}
notify:
runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ jobs:
- name: Update versions in pom.xml
run: |
mvn versions:set-property -Dproperty=alfresco-deployment-service.version -DnewVersion=${{ github.event.inputs.alfresco-deployment-service-version }}
mvn versions:set-property -Dproperty=alfresco-modeling-service.version -DnewVersion=${{ github.event.inputs.alfresco-modeling-service-version }}
mvn versions:set-property -Dproperty=alfresco-process.version -DnewVersion=${{ github.event.inputs.alfresco-process-version }}
mvn versions:set-property -Dproperty=activiti-cloud.version -DnewVersion=${{ github.event.inputs.activiti-cloud-version }}
mvn versions:set -DnewVersion=${{ github.event.inputs.tag-name }}
mvn versions:set-property -Dproperty=alfresco-deployment-service.version -DnewVersion=${{ github.event.inputs.alfresco-deployment-service-version }} -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=alfresco-modeling-service.version -DnewVersion=${{ github.event.inputs.alfresco-modeling-service-version }} -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=alfresco-process.version -DnewVersion=${{ github.event.inputs.alfresco-process-version }} -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=activiti-cloud.version -DnewVersion=${{ github.event.inputs.activiti-cloud-version }} -DgenerateBackupPoms=false
mvn versions:set -DnewVersion=${{ github.event.inputs.tag-name }} -DgenerateBackupPoms=false
- name: Commit Changes
env:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,3 @@ alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib/generated/alfresco-act
!alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib/generated/alfresco-activiti-script-modeling-rest-api/pom.xml
alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib/generated/alfresco-activiti-admin-preference-rest-api/*
!alfresco-apa-java-rest-api/alfresco-apa-java-rest-api-lib/generated/alfresco-activiti-admin-preference-rest-api/pom.xml

*.pom.xml.versionsBackup

0 comments on commit bb48d74

Please sign in to comment.