diff --git a/.github/workflows/common-service-pipeline.yml b/.github/workflows/common-service-pipeline.yml index 0beb4485..0fe74820 100644 --- a/.github/workflows/common-service-pipeline.yml +++ b/.github/workflows/common-service-pipeline.yml @@ -1,28 +1,31 @@ -name: car-demo-common-service +name: Maven Package on: push: - branches: [ main ] + branches: [main] jobs: build: + runs-on: ubuntu-latest permissions: contents: read packages: write + steps: - uses: actions/checkout@v3 - - name: Set up JDK 19 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '19' + java-version: '11' distribution: 'temurin' - server-id: github - settings-path: ${{ github.workspace }} - cache: maven + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml - - name: Build and Publish Maven + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml env: GITHUB_TOKEN: ${{ github.token }} - run: | - . servicedeploy.sh \ No newline at end of file