Skip to content

Commit

Permalink
MAT-7052 add settings and change build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecilia Liu committed Aug 12, 2024
1 parent 758b05f commit b2c69ba
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/maven-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jobs:
with:
java-version: '17'
distribution: 'adopt'
# Github Authentication is required to download artifacts from github packages
# A secret is created for this repo, so that github actions can fetch it, the secret is named after GH_PAT_FOR_ACTIONS_TOKEN
- name: maven-settings
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "github", "username": "madieUser", "password": "${GITHUB_TOKEN_REF}"}]'
githubServer: false
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify

Expand Down
36 changes: 36 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/MeasureAuthoringTool/madie-rest-commons/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${env.GITHUB_USER}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>

0 comments on commit b2c69ba

Please sign in to comment.