qcastel / github-actions-maven-release

Release your Java application and publish artifacts
129 stars 38 forks source link

Enable multi-server settings.xml #41

Closed BernhardFuchs closed 2 years ago

BernhardFuchs commented 2 years ago

For some of our repos we have to setup multiple servers in our credential files e.g.

<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">
    <servers>
       <server>
          <id>maven-internal</id>
          <username>USERNAME</username>
          <password>PWD</password>
       </server>
       <server>
          <id>maven-internal-releases</id>
          <username>USERNAME</username>
          <password>PWD</password>
       </server>
    </servers>
</settings>

Atm the option maven-repo-server-id takes only one id and sets the credentials for it. We already have a custom action to deploy Snapshots which takes a comma separated list https://github.com/danubetech/github-action-prepare-maven-settings-xml

This action doesn't write a file, it sets an environment variable with the contents of the settings.xml. The variable can be consumed in another action (see link in README). Can we have something like this here too?

qcastel commented 2 years ago

Fix in https://github.com/qcastel/github-actions-maven-release/releases/tag/v1.12.28