From 0e3d1ee8b81b55bdbf84dce5f87db548b2cf0d6f Mon Sep 17 00:00:00 2001 From: Gunnar Morling Date: Sun, 18 Feb 2024 22:17:38 +0100 Subject: [PATCH] Test against current archetype version on CI --- .github/workflows/maven.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 55ab105..3b80c00 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -46,7 +46,7 @@ jobs: java-version: 11 distribution: 'temurin' - - name: 'Build Archetype' + - name: 'Build archetype' run: mvn --no-transfer-progress -B --file pom.xml install - name: 'Set up Java 17' @@ -55,5 +55,8 @@ jobs: java-version: 17 distribution: 'temurin' - - name: 'Test Archetype' - run: mkdir test && cd test && mvn archetype:generate -B -DarchetypeGroupId=org.moditect.ossquickstart -DarchetypeArtifactId=oss-quickstart-simple-archetype -DarchetypeVersion=1.0.0.Alpha1 -DgroupId=com.example.demos -DartifactId=fancy-project -Dversion=1.0.0-SNAPSHOT -DmoduleName=com.example.fancy && cd fancy-project && ./mvnw -B verify + - name: 'Determine archetype version' + run: echo "ARCHETYPE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + + - name: 'Test archetype' + run: mkdir test && cd test && mvn archetype:generate -B -DarchetypeGroupId=org.moditect.ossquickstart -DarchetypeArtifactId=oss-quickstart-simple-archetype -DarchetypeVersion=${{ env.ARCHETYPE_VERSION }} -DgroupId=com.example.demos -DartifactId=fancy-project -Dversion=1.0.0-SNAPSHOT -DmoduleName=com.example.fancy && cd fancy-project && ./mvnw -B verify