Skip to content

Commit

Permalink
[v1.2.6] [R] 整合构建、部署(Javadoc)与版本发布。
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmJos committed Jan 16, 2022
1 parent 379068b commit 7138d20
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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:
# 支持手动触发构建
Expand All @@ -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
Expand All @@ -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 }}"
Expand All @@ -65,16 +75,16 @@ 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."
- name: "Push javadocs"
run: |
cd docs
git push origin HEAD:gh-pages --force
git push origin HEAD:gh-pages --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/target/
./*.iml
*.iml
asset/
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<groupId>cc.carm.plugin</groupId>
<artifactId>ultradepository</artifactId>
<packaging>jar</packaging>
<version>1.2.5</version>
<version>1.2.6</version>

<name>UltraDepository</name>
<description>超级仓库插件,支持设定不同物品的存储仓库。</description>
Expand Down Expand Up @@ -244,6 +244,8 @@
</executions>

<configuration>
<finalName>${project.name}-${project.version}</finalName>
<outputDirectory>${project.basedir}/asset/</outputDirectory>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
Expand Down

0 comments on commit 7138d20

Please sign in to comment.