diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..03151ec --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,33 @@ +# 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: Deploy + +on: + # 支持手动触发构建 + workflow_dispatch: + release: + # 创建release的时候触发 + types: [ published ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: "Set up JDK" + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + cache: maven + server-id: github + server-username: MAVEN_USERNAME + server-password: MAVEN_TOKEN + - name: "Deploy" + run: mvn -B deploy --file pom.xml + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index dfbdad3..bdc7f2a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,13 +1,12 @@ # 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: Maven +name: Build on: # 支持手动触发构建 workflow_dispatch: push: - branches: [ master ] jobs: build: @@ -25,13 +24,13 @@ jobs: server-id: github server-username: MAVEN_USERNAME server-password: MAVEN_TOKEN - - name: "Package & Deploy" - run: mvn -B deploy --file pom.xml + - name: "Package" + run: mvn -B package --file pom.xml env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: "Stage" - run: mkdir staging && cp ./*/target/*.jar staging + - name: "Target Stage" + run: mkdir staging && cp target/*.jar staging - name: "Upload artifact" uses: actions/upload-artifact@v2 with: diff --git a/2b2t-common/pom.xml b/2b2t-common/pom.xml index e0a842e..9427ff6 100644 --- a/2b2t-common/pom.xml +++ b/2b2t-common/pom.xml @@ -31,10 +31,10 @@ org.spigotmc - spigot + spigot-api provided - + com.github.azbh111 craftbukkit-1.12.2 diff --git a/2b2t-core/pom.xml b/2b2t-core/pom.xml index 98a50bf..26e9e2f 100644 --- a/2b2t-core/pom.xml +++ b/2b2t-core/pom.xml @@ -32,7 +32,7 @@ org.spigotmc - spigot + spigot-api provided diff --git a/2b2t-death/pom.xml b/2b2t-death/pom.xml index 5250b2f..bea3a2a 100644 --- a/2b2t-death/pom.xml +++ b/2b2t-death/pom.xml @@ -37,7 +37,7 @@ org.spigotmc - spigot + spigot-api provided diff --git a/2b2t-logger/pom.xml b/2b2t-logger/pom.xml index 456d285..2c6ed1c 100644 --- a/2b2t-logger/pom.xml +++ b/2b2t-logger/pom.xml @@ -34,11 +34,11 @@ provided - - org.spigotmc - spigot - provided - + + org.spigotmc + spigot-api + provided + com.github.azbh111 diff --git a/2b2t-spawn/pom.xml b/2b2t-spawn/pom.xml index 93cbc9c..cdd3d0b 100644 --- a/2b2t-spawn/pom.xml +++ b/2b2t-spawn/pom.xml @@ -37,7 +37,7 @@ org.spigotmc - spigot + spigot-api provided diff --git a/pom.xml b/pom.xml index dbc9b3c..11d314b 100644 --- a/pom.xml +++ b/pom.xml @@ -70,10 +70,10 @@ https://repo.extendedclip.com/content/repositories/placeholderapi/ - - lss233-repo - https://lss233.littleservice.cn/repositories/minecraft - + + + + oss-repo @@ -110,10 +110,11 @@ + org.spigotmc - spigot - 1.12-R0.1-SNAPSHOT + spigot-api + 1.17-R0.1-SNAPSHOT