📦 Update publish-snapshot.yml

This commit is contained in:
yadong.zhang 2021-04-28 15:32:11 +08:00
parent b6a42f023a
commit f340d57ebc

View File

@ -12,26 +12,22 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# 安装JDK环境
- name: Set up JDK 1.8
uses: actions/setup-java@v2
with:
java-version: 1.8
server-id: sonatype-nexus-snapshots # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to GitHub Packages Apache Maven
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- uses: actions/checkout@v2
# 安装JDK环境
- name: Set up JDK 1.8
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: 'adopt'
server-id: sonatype-nexus-snapshots # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish to GitHub Packages Apache Maven
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}