diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index 5eb9871..7ce00a1 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -11,7 +11,7 @@ jobs: packages: write steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 for deploy to S3 bucket + - name: Set up JDK and Maven uses: actions/setup-java@v4 with: distribution: adopt @@ -40,6 +40,30 @@ jobs: } } ] + profiles: > + [ + { + "id": "s3Deploy", + "properties": + { + "altDeploymentRepository": "s3::default::s3://sbb-polarion-maven-repo/polarion.mvn" + } + }, + { + "id": "githubDeploy", + "properties": + { + "altDeploymentRepository": "github::default::https://maven.pkg.github.com/SchweizerischeBundesbahnen/ch.sbb.polarion.extension.extension-name" + } + }, + { + "id": "repsyDeploy", + "properties": + { + "altDeploymentRepository": "repsy::default::https://repo.repsy.io/mvn/sbb/polarion" + } + } + ] servers: > [ { @@ -58,17 +82,14 @@ jobs: "password": "${{ secrets.CH_SBB_POLARION_REPSY_PASSWORD }}" } ] - active_profiles: > - [ - "github" - ] - name: Print settings.xml run: cat /home/runner/.m2/settings.xml - name: Build with Maven run: mvn --batch-mode clean package - name: Extract artefact version id: artefact_version - run: echo ::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" + >> $GITHUB_OUTPUT - name: Publish to S3 bucket if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }} run: mvn --batch-mode deploy -Ps3Deploy