Skip to content

Commit

Permalink
AAE-26208 Workflow adjustment (#2351)
Browse files Browse the repository at this point in the history
* AAE-26208 changes: tag creation moved to final step, whitelist branch fix

* AAE-26208 regex to pass release branch

* AAE-26208 trick to pass workflow on label
  • Loading branch information
wojciech-piotrowiak authored Oct 12, 2024
1 parent 0ad27c3 commit 734516a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,20 @@ jobs:
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
echo "::set-output name=version::$VERSION"
- name: Create GitHub tag
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
VERSION: ${{ env.VERSION }}
run: |
git tag ${{ env.VERSION }}
git push ${{ env.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 }}
gh release create ${VERSION} --title ${VERSION} --notes "Release ${VERSION}"
notify:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/enforce-pr-conventions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- reopened
- synchronize
- edited
- labeled
branches:
- develop
jobs:
Expand All @@ -20,5 +21,6 @@ jobs:
uses: Alfresco/alfresco-build-tools/.github/actions/enforce-pr-conventions@209bb4275688720e13dc0703dbd17826bf677c5c # v6.1.0
with:
jira-project-key: AAE|HXOR
valid-branch-regex: ^(revert-|(improvement|fix|feature|test|tmp|release)\/(AAE|HXOR)-[0-9]+[_-]{1}[A-Za-z0-9._-]+|release\/[A-Za-z0-9]+)$
whitelist-branches: |-
release-*
release/*
5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ jobs:
commit-message: "Release ${VERSION}"
add-options: "."

- name: Create GitHub tag
run: |
git tag ${{ github.event.inputs.tag-name }}
git push origin ${{ github.event.inputs.tag-name }}
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,10 @@ Requires the following secrets to be set:

The release process is partially automated using the [release workflow](.github/workflows/release.yml).
This workflow creates a release branch, updates the version in the `pom.xml` files, and creates a PR for the release branch.
When the PR is merged, the release is automatically published to the internal Maven repository.

To create a release, follow these steps:

1. Run workflow mentioned above.
2. Add any label into generated PR to trigger check run.
3. Merge the PR if no issues are found.
4. Check if new github release and tag is created.

0 comments on commit 734516a

Please sign in to comment.