Skip to content

Commit

Permalink
#25951 Testing next version setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolina committed Sep 21, 2023
1 parent 2fbe8f7 commit 27c38bb
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/cli-release-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
2 changes: 1 addition & 1 deletion tools/dotcms-cli/api-data-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>dotCMS-cli</artifactId>
<groupId>com.dotcms</groupId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
6 changes: 3 additions & 3 deletions tools/dotcms-cli/cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>dotCMS-cli</artifactId>
<groupId>com.dotcms</groupId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -40,13 +40,13 @@
<dependency>
<groupId>com.dotcms</groupId>
<artifactId>api-data-model</artifactId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.dotcms</groupId>
<artifactId>api-data-model</artifactId>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion tools/dotcms-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.dotcms</groupId>
<artifactId>dotCMS-cli</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
<version>1.0.0-SNAPSHOT</version>
<modules>
<module>api-data-model</module>
<module>cli</module>
Expand Down

0 comments on commit 27c38bb

Please sign in to comment.