From 7138d20357d41bd74942e1df1a4b87015b9d706f Mon Sep 17 00:00:00 2001 From: CarmJos Date: Sun, 16 Jan 2022 08:08:17 +0800 Subject: [PATCH] =?UTF-8?q?[v1.2.6]=20[R]=20=E6=95=B4=E5=90=88=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E3=80=81=E9=83=A8=E7=BD=B2(Javadoc)=E4=B8=8E=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=91=E5=B8=83=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 26 ++++++++++++++++++-------- .gitignore | 1 + pom.xml | 4 +++- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f5f085b..12c2754 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,7 +1,7 @@ # 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 -name: Project Deploy +name: Deploy & Upload on: # 支持手动触发构建 @@ -27,13 +27,23 @@ jobs: server-username: MAVEN_USERNAME server-password: MAVEN_TOKEN - - name: "Maven Deploy With Javadoc" + - name: "Maven Deploy" run: mvn -B deploy --file pom.xml -DskipTests env: MAVEN_USERNAME: ${{ github.repository_owner }} 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: | rm -rf docs mkdir -vp docs @@ -44,10 +54,10 @@ jobs: id: sitemap uses: cicirello/generate-sitemap@v1 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 - - name: "Output stats" + - name: "Output Javadoc stats" run: | echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}" echo "url-count = ${{ steps.sitemap.outputs.url-count }}" @@ -65,11 +75,11 @@ jobs: git config --global user.name 'CarmJos' git config --global user.email 'carm@carm.cc' - - name: "Commit documentations" + - name: "Commit Javadocs" run: | cd docs 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 add -A git commit -m "API Document generated." @@ -77,4 +87,4 @@ jobs: - name: "Push javadocs" run: | cd docs - git push origin HEAD:gh-pages --force + git push origin HEAD:gh-pages --force \ No newline at end of file diff --git a/.gitignore b/.gitignore index 445f9d3..5a4ce4a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /target/ ./*.iml *.iml +asset/ \ No newline at end of file diff --git a/pom.xml b/pom.xml index 2b7bcfc..bbe0d0b 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ cc.carm.plugin ultradepository jar - 1.2.5 + 1.2.6 UltraDepository 超级仓库插件,支持设定不同物品的存储仓库。 @@ -244,6 +244,8 @@ + ${project.name}-${project.version} + ${project.basedir}/asset/ false