Skip to content

Commit 2ccd1ad

Browse files
author
Bryan Clark
committed
Add examples of the settings.xml file generated
1 parent c05b45b commit 2ccd1ad

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,32 @@ jobs:
8989
- name: Publish to Apache Maven Central
9090
run: mvn deploy
9191
env:
92-
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
9392
MAVEN_USERNAME: maven_username123
93+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
94+
```
95+
96+
The two `settings.xml` files created from the above example look like the following.
97+
98+
`settings.xml` file created for the first deploy to GitHub Packages
99+
```xml
100+
<servers>
101+
<server>
102+
<id>github</id>
103+
<username>${env.GITHUB_ACTOR}</username>
104+
<password>${env.GITHUB_TOKEN}</password>
105+
</server>
106+
</servers>
107+
```
108+
109+
`settings.xml` file created for the second deploy to Apache Maven Central
110+
```xml
111+
<servers>
112+
<server>
113+
<id>maven</id>
114+
<username>${env.MAVEN_USERNAME}</username>
115+
<password>${env.MAVEN_CENTRAL_TOKEN}</password>
116+
</server>
117+
</servers>
94118
```
95119

96120
***NOTE: The `settings.xml` file is created in the Actions $HOME directory. If you have an existing `settings.xml` file at that location, it will be overwritten. See below for using the `settings-path` to change your `settings.xml` file location.***

0 commit comments

Comments
 (0)