diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd9b89ac9..1ea07f9f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/enforce-pr-conventions.yml b/.github/workflows/enforce-pr-conventions.yml index 5965cb009..4109843ea 100644 --- a/.github/workflows/enforce-pr-conventions.yml +++ b/.github/workflows/enforce-pr-conventions.yml @@ -7,6 +7,7 @@ on: - reopened - synchronize - edited + - labeled branches: - develop jobs: @@ -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/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88d14fc5f..95c268b05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/README.md b/README.md index e9304d17f..6f86474f2 100644 --- a/README.md +++ b/README.md @@ -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.