diff --git a/.github/workflows/cli-release-process.yml b/.github/workflows/cli-release-process.yml index 2c279e23709a..91d58578c39d 100644 --- a/.github/workflows/cli-release-process.yml +++ b/.github/workflows/cli-release-process.yml @@ -58,9 +58,8 @@ jobs: run: | VERSION=${{ github.event.inputs.version }} NEXT=${{ github.event.inputs.next }} - HEAD=${{ github.ref_name }} - GIT_HEAD=`git rev-parse HEAD` + HEAD=`git rev-parse HEAD` echo "GIT_HEAD=$GIT_HEAD" ./mvnw -B -ntp versions:set versions:commit -DnewVersion=$VERSION @@ -70,12 +69,36 @@ jobs: echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" echo "NEXT=$NEXT" >> "$GITHUB_OUTPUT" - + echo "HEAD=$HEAD" >> "$GITHUB_OUTPUT" release: needs: [ precheck ] runs-on: ubuntu-latest steps: - - name: vars + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Java + uses: actions/setup-java@v3 + with: + java-version: ${{ env.JAVA_VERSION }} + distribution: ${{ env.JAVA_DISTRO }} + + - name: Cache Maven + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Set next version run: | - echo "REF=${{ github.ref }}" - echo "REF_NAME=${{ github.ref_name }}" + VERSION=${{ needs.precheck.outputs.VERSION }} + NEXT=${{ needs.precheck.outputs.NEXT }} + HEAD=${{ needs.precheck.outputs.HEAD }} + + ./mvnw -B -ntp versions:set versions:commit -DnewVersion=$NEXT + + git commit -a -m "⬆️ Next version $NEXT" + git push origin "$HEAD" \ No newline at end of file diff --git a/tools/dotcms-cli/api-data-model/pom.xml b/tools/dotcms-cli/api-data-model/pom.xml index f4500153d1b5..9ebd7a0c0deb 100644 --- a/tools/dotcms-cli/api-data-model/pom.xml +++ b/tools/dotcms-cli/api-data-model/pom.xml @@ -5,7 +5,7 @@ dotCMS-cli com.dotcms - 1.0.0 + 1.0.0-SNAPSHOT 4.0.0 diff --git a/tools/dotcms-cli/cli/pom.xml b/tools/dotcms-cli/cli/pom.xml index 624a85af4f71..9d894c168c3f 100644 --- a/tools/dotcms-cli/cli/pom.xml +++ b/tools/dotcms-cli/cli/pom.xml @@ -5,7 +5,7 @@ dotCMS-cli com.dotcms - 1.0.0 + 1.0.0-SNAPSHOT 4.0.0 @@ -40,13 +40,13 @@ com.dotcms api-data-model - 1.0.0 + 1.0.0-SNAPSHOT com.dotcms api-data-model - 1.0.0 + 1.0.0-SNAPSHOT test-jar test diff --git a/tools/dotcms-cli/pom.xml b/tools/dotcms-cli/pom.xml index e934b96f5c38..22402403f62a 100644 --- a/tools/dotcms-cli/pom.xml +++ b/tools/dotcms-cli/pom.xml @@ -5,7 +5,7 @@ com.dotcms dotCMS-cli pom - 1.0.0 + 1.0.0-SNAPSHOT api-data-model cli