Skip to content

Commit

Permalink
test upload github package
Browse files Browse the repository at this point in the history
  • Loading branch information
eric2788 committed Mar 30, 2022
1 parent 4fafa8c commit 1af1e9d
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 43 deletions.
53 changes: 20 additions & 33 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,34 @@ on:
branches: [ master ]
jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout Source Code
id: checkout-source
uses: actions/checkout@v2
- name: Set up JDK 11
id: setup-java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Delete tag and release
id: delete-tag-release
uses: dev-drprasad/[email protected]
with:
tag_name: ${{ env.version }}
delete_release: true
- name: Create Release
id: create_release
uses: actions/create-release@v1
- name: publish jar
uses: eric2788/maven-jar-publish@v1
with:
tag_name: ${{ env.version }}
release_name: Release ${{ github.repository }}-${{ env.version }}
body: |
版本更新請到[這裏](https://eric2788.gitbook.io/eldependenci-sql/references/update/v0.0.5)查看。
draft: false
prerelease: false
- name: Upload Release jar
id: upload-release-asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./${{ env.plugin_name }}/target/${{ env.plugin_name }}-${{env.version}}.jar # 請根據你插件名稱進行的修改
asset_name: ${{ env.plugin_name }}-${{ env.version }}.jar # 請根據你插件名稱進行的修改
asset_content_type: application/java-archive
body-path: changelog.md
- name: 'Update javadocs'
id: update-javadoc
uses: eric2788/push-javadoc-branch@main
with:
use-maven: true
javadocs: "javadocs"
javadocs: "javadocs"
publish:
runs-on: ubuntu-latest
needs: [ build ]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'adopt'
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
版本更新請到[這裏](https://eric2788.gitbook.io/eldependenci-sql/references/update/v0.0.5)查看。
9 changes: 8 additions & 1 deletion eldependenci-sql-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ELDependenci-SQL-Module</artifactId>
<artifactId>eldependenci-sql-module</artifactId>
<groupId>org.eldependenci</groupId>
<version>0.0.5</version>
</parent>
Expand Down Expand Up @@ -69,6 +69,13 @@
</artifactSet>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
1 change: 1 addition & 0 deletions eldependenci-sql-plugin/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ name: ELDependenci-SQL
main: chu77.eldependenci.sql.SQLAddon
version: ${project.version}
depend: [ELDependenci]
api-version: "1.16"
2 changes: 1 addition & 1 deletion eldependenci-sql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ELDependenci-SQL-Module</artifactId>
<artifactId>eldependenci-sql-module</artifactId>
<groupId>org.eldependenci</groupId>
<version>0.0.5</version>
</parent>
Expand Down
30 changes: 22 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.eldependenci</groupId>
<artifactId>ELDependenci-SQL-Module</artifactId>
<artifactId>eldependenci-sql-module</artifactId>
<packaging>pom</packaging>
<version>0.0.5</version>
<modules>
Expand All @@ -16,6 +16,7 @@
<properties>
<hibernate.version>5.5.5.Final</hibernate.version>
<guice.version>5.0.1</guice.version>
<maven.compiler.target>16</maven.compiler.target>
</properties>


Expand All @@ -25,8 +26,8 @@
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>chu77</id>
<url>https://nexus.chu77.xyz/repository/plugins/</url>
<id>github</id>
<url>https://maven.pkg.github.com/ELDependenci/eldependenci</url>
</repository>

</repositories>
Expand Down Expand Up @@ -84,13 +85,13 @@
<dependency>
<groupId>org.eldependenci</groupId>
<artifactId>eldependenci-framework</artifactId>
<version>0.1.1</version>
<version>0.1.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eldependenci</groupId>
<artifactId>eldependenci-addon</artifactId>
<version>0.1.1</version>
<version>0.1.5</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -151,7 +152,8 @@
<configuration>
<links>
<link>https://hub.spigotmc.org/javadocs/spigot/</link>
<link>https://javadoc.io/doc/org.sql2o/sql2o/latest/org/sql2o/Query.html</link>
<link>https://docs.jboss.org/hibernate/orm/5.4/javadocs/</link>
<link>https://docs.spring.io/spring-data/jpa/docs/current/api/</link>
</links>
<show>public</show>
<isOffline>false</isOffline>
Expand All @@ -175,8 +177,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<source>${maven.compiler.target}</source>
<target>${maven.compiler.target}</target>
<encoding>UTF-8</encoding>
<excludes>
<exclude>**/org/aopalliance/**</exclude>
Expand Down Expand Up @@ -215,6 +217,11 @@
</relocations-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M2</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand All @@ -229,4 +236,11 @@
</plugins>
</build>

<distributionManagement>
<repository>
<id>github</id>
<uniqueVersion>false</uniqueVersion>
<url>https://maven.pkg.github.com/ELDependenci/eldependenci-sql</url>
</repository>
</distributionManagement>
</project>

0 comments on commit 1af1e9d

Please sign in to comment.