1
mirror of https://github.com/CarmJos/UltraDepository.git synced 2024-09-19 11:45:47 +00:00

[v1.2.6] [R] 整合构建、部署(Javadoc)与版本发布。

This commit is contained in:
Carm Jos 2022-01-16 08:08:17 +08:00
parent 379068b440
commit 7138d20357
3 changed files with 22 additions and 9 deletions

View File

@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Project Deploy name: Deploy & Upload
on: on:
# 支持手动触发构建 # 支持手动触发构建
@ -27,13 +27,23 @@ jobs:
server-username: MAVEN_USERNAME server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN server-password: MAVEN_TOKEN
- name: "Maven Deploy With Javadoc" - name: "Maven Deploy"
run: mvn -B deploy --file pom.xml -DskipTests run: mvn -B deploy --file pom.xml -DskipTests
env: env:
MAVEN_USERNAME: ${{ github.repository_owner }} MAVEN_USERNAME: ${{ github.repository_owner }}
MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}} MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: "Copy Javadoc to Location" - name: "Release Asset Upload"
id: upload-release-asset
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: asset/*.jar
asset_content_type: application/java-archive
- name: "Javadoc Deploy Staging"
run: | run: |
rm -rf docs rm -rf docs
mkdir -vp docs mkdir -vp docs
@ -44,10 +54,10 @@ jobs:
id: sitemap id: sitemap
uses: cicirello/generate-sitemap@v1 uses: cicirello/generate-sitemap@v1
with: with:
base-url-path: https://carmjos.github.io/EasySQL base-url-path: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
path-to-root: docs path-to-root: docs
- name: "Output stats" - name: "Output Javadoc stats"
run: | run: |
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}" echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
echo "url-count = ${{ steps.sitemap.outputs.url-count }}" echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
@ -65,11 +75,11 @@ jobs:
git config --global user.name 'CarmJos' git config --global user.name 'CarmJos'
git config --global user.email 'carm@carm.cc' git config --global user.email 'carm@carm.cc'
- name: "Commit documentations" - name: "Commit Javadocs"
run: | run: |
cd docs cd docs
git init git init
git remote add origin git@github.com:CarmJos/UltraDepository.git git remote add origin git@github.com:${{ github.repository }}.git
git checkout -b gh-pages git checkout -b gh-pages
git add -A git add -A
git commit -m "API Document generated." git commit -m "API Document generated."
@ -77,4 +87,4 @@ jobs:
- name: "Push javadocs" - name: "Push javadocs"
run: | run: |
cd docs cd docs
git push origin HEAD:gh-pages --force git push origin HEAD:gh-pages --force

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/target/ /target/
./*.iml ./*.iml
*.iml *.iml
asset/

View File

@ -15,7 +15,7 @@
<groupId>cc.carm.plugin</groupId> <groupId>cc.carm.plugin</groupId>
<artifactId>ultradepository</artifactId> <artifactId>ultradepository</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.2.5</version> <version>1.2.6</version>
<name>UltraDepository</name> <name>UltraDepository</name>
<description>超级仓库插件,支持设定不同物品的存储仓库。</description> <description>超级仓库插件,支持设定不同物品的存储仓库。</description>
@ -244,6 +244,8 @@
</executions> </executions>
<configuration> <configuration>
<finalName>${project.name}-${project.version}</finalName>
<outputDirectory>${project.basedir}/asset/</outputDirectory>
<createDependencyReducedPom>false</createDependencyReducedPom> <createDependencyReducedPom>false</createDependencyReducedPom>
<relocations> <relocations>
<relocation> <relocation>