Unverified Commit 47374962 authored by Vivek Kumar's avatar Vivek Kumar Committed by GitHub
Browse files

[ACS-10941][MNT-25301]: SDK - Intermediate versions must not be published to Maven Central (#733)

parent 7d69fb28
Loading
Loading
Loading
Loading
+26 −2
Original line number Diff line number Diff line
@@ -168,12 +168,36 @@ jobs:
      - name: "Build"
        run: mvn clean install -B ${{ matrix.suite }}

  publish:
    name: "Publish artifacts"
  check_version:
    name: "Check version"
    runs-on: ubuntu-latest
    needs: [tests]
    if: >
      contains(github.event.head_commit.message, '[publish]')
    outputs:
        is_ga: ${{ steps.publish_version.outputs.is_ga }}
    steps:
      - uses: actions/checkout@v4
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
      - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
      - name: "Check version"
        id: publish_version
        run: |
          VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
          if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
            echo "is_ga=true" >> $GITHUB_OUTPUT
            echo "GA version detected: $VERSION"
          else
            echo "is_ga=false" >> $GITHUB_OUTPUT
            echo "Non GA version detected: $VERSION"
          fi

  publish:
    name: "Publish artifacts"
    runs-on: ubuntu-latest
    needs: [tests, check_version]
    if: >
      contains(github.event.head_commit.message, '[publish]') && needs.check_version.outputs.is_ga == 'true'
    steps:
      - uses: actions/checkout@v4
      - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
  <parent>
    <groupId>org.alfresco.maven</groupId>
    <artifactId>alfresco-sdk-aggregator</artifactId>
    <version>4.13.0-A1</version>
    <version>4.13.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

+3 −3
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@
    <groupId>${groupId}</groupId>
    <artifactId>${artifactId}</artifactId>
    <version>${version}</version>
    <name>AIO - SDK 4.13.0-A1</name>
    <description>All-In-One (AIO) project for SDK 4.13.0-A1</description>
    <name>AIO - SDK 4.13.0</name>
    <description>All-In-One (AIO) project for SDK 4.13.0</description>
    <packaging>pom</packaging>

    <prerequisites>
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
  <parent>
    <groupId>org.alfresco.maven</groupId>
    <artifactId>alfresco-sdk-aggregator</artifactId>
    <version>4.13.0-A1</version>
    <version>4.13.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
    <parent>
        <groupId>org.alfresco.maven</groupId>
        <artifactId>alfresco-sdk-aggregator</artifactId>
        <version>4.13.0-A1</version>
        <version>4.13.0</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

Loading