-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Description
GitHub Package
密钥配置 | Secret Configuration
-
GPG_SECRET_KEYS(可选):- gpg 私钥
- GPG private key
-
需要配置环境变量
GITHUB_TOKEN,推荐使用GITHUB_TOKEN: ${{ github.token }},GitHub CI 中cat ~/.m2/settings.xml<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 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>github</id> <username>${env.GITHUB_ACTOR}</username> <password>${env.GITHUB_TOKEN}</password> </server> </servers> </settings>
触发条件 | Trigger Condition
github.repository_owner == 'alibaba' && github.event_name == 'push'发布 | Release
mvn clean deploy -Prelease快照 | SNAPSHOT
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/alibaba/spring-cloud-alibaba</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>使用 | Use
- Maven
settings.xml文件中配置,创建 GitHub Token 地址:https://github.com/settings/tokens
<server>
<id>github</id>
<username>GitHub 用户名</username>
<password>GitHub Token(需要 read:packages 权限)</password>
</server>Maven 中央仓库 | Maven Central Repository
密钥配置 | Secret Configuration
GPG_SECRET_KEYS:- gpg 私钥
- GPG private key
CENTRAL_USERNAME:- https://central.sonatype.com 用户名,建议在 https://central.sonatype.com/usertoken 中创建
Token,使用
<publishingServerId>central</publishingServerId>、-s settings.xml激活 - Username for https://central.sonatype.com. It is recommended to create a
Token
at https://central.sonatype.com/usertoken and use<publishingServerId>central</publishingServerId>、
-s settings.xmlto activate it.
- https://central.sonatype.com 用户名,建议在 https://central.sonatype.com/usertoken 中创建
CENTRAL_PASSWORD:- https://central.sonatype.com 密码,同
CENTRAL_USERNAME - Password for https://central.sonatype.com, same as
CENTRAL_USERNAME
- https://central.sonatype.com 密码,同
触发条件 | Trigger Condition
github.repository_owner == 'alibaba' && github.event_name == 'push'发布 | Release
mvn clean deploy -Prelease -s settings.xml快照 | SNAPSHOT
<repositories>
<repository>
<id>central-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>Reactions are currently unavailable