3838 distribution : ' temurin'
3939 cache : maven
4040
41- - name : Configure Maven settings
42- uses : s4u/maven-settings-action@v3.0.0
43- with :
44- servers : |
45- [{
46- "id": "github",
47- "username": "${{ github.actor }}",
48- "password": "${{ secrets.GITHUB_TOKEN }}"
49- }]
50- repositories : |
51- [{
52- "id": "github",
53- "url": "https://maven.pkg.github.com/codice/*",
54- "snapshots": {"enabled": true}
55- }]
56-
5741 - name : Build
5842 run : mvn clean install $MAVEN_CLI_OPTS -DskipTests -pl '!docker'
5943
7256 distribution : ' temurin'
7357 cache : maven
7458
75- - name : Configure Maven settings
76- uses : s4u/maven-settings-action@v3.0.0
77- with :
78- servers : |
79- [{
80- "id": "github",
81- "username": "${{ github.actor }}",
82- "password": "${{ secrets.GITHUB_TOKEN }}"
83- }]
84- repositories : |
85- [{
86- "id": "github",
87- "url": "https://maven.pkg.github.com/codice/*",
88- "snapshots": {"enabled": true}
89- }]
90-
9159 - name : Build
9260 run : mvn clean install $MAVEN_CLI_OPTS -DskipTests -pl '!docker'
9361
9866 (github.ref == 'refs/heads/master' || contains(github.ref, '.x'))
9967 runs-on : ubuntu-latest
10068 environment : production
101- permissions :
102- packages : write
10369 steps :
10470 - name : Checkout
10571 uses : actions/checkout@v4
@@ -111,37 +77,19 @@ jobs:
11177 distribution : ' temurin'
11278 cache : maven
11379
114- - name : Configure Maven settings
115- uses : s4u/maven-settings-action@v3.0.0
116- with :
117- servers : |
118- [{
119- "id": "releases",
120- "username": "${{ github.actor }}",
121- "password": "${{ secrets.GITHUB_TOKEN }}"
122- },
123- {
124- "id": "snapshots",
125- "username": "${{ github.actor }}",
126- "password": "${{ secrets.GITHUB_TOKEN }}"
127- },
128- {
129- "id": "github",
130- "username": "${{ github.actor }}",
131- "password": "${{ secrets.GITHUB_TOKEN }}"
132- }]
133- repositories : |
134- [{
135- "id": "github",
136- "url": "https://maven.pkg.github.com/codice/*",
137- "snapshots": {"enabled": true}
138- }]
80+ - name : Create Maven Settings
81+ env :
82+ NEXUS_USERNAME : ${{ secrets.NEXUS_USERNAME }}
83+ NEXUS_PASSWORD : ${{ secrets.NEXUS_PASSWORD }}
84+ run : |
85+ mkdir -p ~/.m2
86+ printf '<settings>\n <servers>\n <server>\n <id>releases</id>\n <username>%s</username>\n <password>%s</password>\n </server>\n <server>\n <id>snapshots</id>\n <username>%s</username>\n <password>%s</password>\n </server>\n </servers>\n</settings>\n' "$NEXUS_USERNAME" "$NEXUS_PASSWORD" "$NEXUS_USERNAME" "$NEXUS_PASSWORD" > ~/.m2/settings.xml
13987
14088 - name : Deploy
14189 run : |
14290 mvn deploy $MAVEN_CLI_OPTS \
14391 -DskipTests=true \
14492 -DretryFailedDeploymentCount=10 \
14593 -pl '!docker' \
146- -DaltReleaseDeploymentRepository=releases::https://maven.pkg.github.com/codice/acdebugger \
147- -DaltSnapshotDeploymentRepository=snapshots::https://maven.pkg.github.com/codice/acdebugger
94+ -DaltReleaseDeploymentRepository=releases::https://repo.codice.org/repository/maven-releases/ \
95+ -DaltSnapshotDeploymentRepository=snapshots::https://repo.codice.org/repository/maven-snapshots/
0 commit comments