diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index baff863f..ebefd802 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,8 +176,7 @@ jobs: runs-on: ubuntu-latest needs: [tests] if: > - contains(github.event.head_commit.message, '[publish]') && - github.ref_name == 'master' + contains(github.event.head_commit.message, '[publish]') steps: - uses: actions/checkout@v4 - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.28.1 @@ -204,6 +203,10 @@ jobs: run: | git config --global user.name "${GIT_USERNAME:-github-actions[bot]}" git config --global user.email "${GIT_EMAIL:-github-actions[bot]@users.noreply.github.com}" + - name: "Publish" + timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} + run: | + mvn --batch-mode clean package gpg:sign central-publishing:publish -P sdk-release -DskipTests=true -Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE - name: "Create release tag" run: | mvn --batch-mode clean package gpg:sign -P sdk-release -DskipTests=true -Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE \ @@ -213,8 +216,4 @@ jobs: -Dpassword=$GIT_PASSWORD \ -DautoVersionSubmodules=true \ -DtagNameFormat=@{project.version} \ - -B - - name: "Publish" - timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} - run: | - mvn --batch-mode clean package gpg:sign central-publishing:publish -P sdk-release -DskipTests=true -Dgpg.passphrase=$GPG_SIGNING_PASSPHRASE \ No newline at end of file + -B \ No newline at end of file