Skip to content

Commit

Permalink
pipeline config to deploy packages when releasing a new version
Browse files Browse the repository at this point in the history
  • Loading branch information
teixeira-fernando committed Oct 15, 2023
1 parent 8bf6e6d commit 664bcb3
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/maven-packages-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
run: GITHUB_TOKEN=${{ github.token }} make publish_all_packages

0 comments on commit 664bcb3

Please sign in to comment.