Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deployment profiles added #12

Merged
merged 5 commits into from
May 29, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/REPOSITORY_NAME"
}
ariwk marked this conversation as resolved.
Show resolved Hide resolved
},
{
"id": "repsyDeploy",
"properties":
{
"altDeploymentRepository": "repsy::default::https://repo.repsy.io/mvn/sbb/polarion"
}
}
]
servers: >
[
{
Expand All @@ -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 "name=version::$(mvn help:evaluate -Dexpression=project.version
-q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Publish to S3 bucket
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
ariwk marked this conversation as resolved.
Show resolved Hide resolved
run: mvn --batch-mode deploy -Ps3Deploy
Expand Down
Loading