diff --git a/.github/workflows/generate-code.yaml b/.github/workflows/generate-code.yaml index c79efc0..7dc96d7 100644 --- a/.github/workflows/generate-code.yaml +++ b/.github/workflows/generate-code.yaml @@ -24,14 +24,19 @@ jobs: - uses: actions/checkout@v3 - - name: Install xmlstarlet for pom.xml manipulation - run: sudo apt-get install -y xmlstarlet - - name: Download OpenAPI spec from above job uses: actions/download-artifact@v3 with: name: ${{ inputs.source_artifact }} + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Create code based on OpenAPI spec run: ./generate.sh env: @@ -42,5 +47,4 @@ jobs: with: name: ${{ inputs.target_artifact }} path: | - src - pom.xml + . diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml index 9c4b8df..ae82f5d 100644 --- a/.github/workflows/generate.yaml +++ b/.github/workflows/generate.yaml @@ -19,37 +19,7 @@ jobs: with: cmk_version: 2.2.0p12 source_artifact: openapi - target_artifact: source - - build: - runs-on: ubuntu-latest - needs: generate-code - strategy: - matrix: - java: [ 8, 11, 17, 21 ] - steps: - - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java }} - distribution: 'adopt' - - - name: Download source - uses: actions/download-artifact@v3 - with: - name: source - - - name: Cache local Maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - - name: Build with Maven - run: mvn -B package --file pom.xml + target_artifact: build deploy-snapshot: runs-on: ubuntu-latest