From 664bcb3484d319fa11eedabd041216532e7b39cc Mon Sep 17 00:00:00 2001 From: fernando Date: Sun, 15 Oct 2023 17:08:51 +0200 Subject: [PATCH] pipeline config to deploy packages when releasing a new version --- .github/workflows/maven-packages-publish.yml | 28 ++++++-------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/maven-packages-publish.yml b/.github/workflows/maven-packages-publish.yml index 10d7db1..65cb511 100644 --- a/.github/workflows/maven-packages-publish.yml +++ b/.github/workflows/maven-packages-publish.yml @@ -2,14 +2,9 @@ # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path name: Maven Package - on: - pull_request: - types: [opened, synchronize, reopened] - -#on: -# release: -# types: [created] + release: + types: [created] jobs: build: @@ -20,20 +15,13 @@ jobs: packages: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '11' - distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - + java-version: 11 + distribution: 'adopt' + - name: maven install + run: mvn clean install - name: Publish to GitHub Packages Apache Maven - run: | - mvn -f inventory/ deploy -s settings.xml - mvn -f shop/ deploy -s settings.xml - mvn -f shipment/ deploy -s settings.xml - mvn -f base-domain/ deploy -s settings.xml - env: - GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file + run: GITHUB_TOKEN=${{ github.token }} make publish_all_packages \ No newline at end of file