Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
# Artifact name
name: Jar_Snapshot_Build # optional
# A file, directory or wildcard pattern that describes what to upload
path: target/scoreboard-*.jar
- name: Upload to Repo
run: |
echo "Deploying to the Github..."
git clone --depth=1 https://${{ secrets.REPO_KEY }}@github.com/jingwenMC/MavenRepo.git /home/runner/MavenRepo
mvn deploy -DaltDeploymentRepository=maven-repo::default::file:/home/runner/MavenRepo
git config --global user.email "actions@github.com"
git config --global user.name "Github Actions User"
cd /home/runner/MavenRepo
git add .
echo "Committing..."
git commit -m "Auto update by Github Actions"
echo "Pushing..."
git push --force
- name: Auto Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: build-${{ github.run_number }}
release_name: ScoreboardLib Snapshot Build ${{ github.run_number }}
body: |
提交代码自动发布的Release
构建编号: build-${{ github.run_number }}
draft: false
prerelease: true
- name: Create zip Asset
run: |
zip -v Released_File_Build_${{ github.run_number }}.zip ./target/*.jar
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Released_File_Build_${{ github.run_number }}.zip
asset_name: Released_File_Build_${{ github.run_number }}.zip
asset_content_type: application/zip
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea/
output/
target/
ScoreboardLib.iml
.idea/**
output/**
target/**
/scoreboard.iml
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ How do I add it to my project?
--------------
Simply add the following to your `pom.xml`.

<repository>
<id>tiger-repo</id>
<url>http://repo.tigerhix.me/content/repositories/snapshots/</url>
</repository>
<repositories>
<repository>
<id>jingwenmc-repo</id>
<url>https://raw.githubusercontent.com/jingwenMC/MavenRepo/master</url>
</repository>
</repositories>

<dependency>
<groupId>me.tigerhix.lib</groupId>
<artifactId>scoreboard</artifactId>
<version>1.0.1-SNAPSHOT</version>
<groupId>me.tigerhix.lib</groupId>
<artifactId>scoreboard</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>

Now you are able to create your own pretty scoreboards.
Expand Down
87 changes: 58 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,75 @@

<repositories>
<repository>
<id>tiger-repo</id>
<url>http://repo.tigerhix.me/content/groups/public/</url>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>

<distributionManagement>
<snapshotRepository>
<id>nexus</id>
<url>http://repo.tigerhix.me/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.yml</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<O>-Xlint:all</O>
<O>-Xlint:-path</O>
</compilerArguments>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,6 @@ public boolean isBanned() {
return false;
}

@Override
public void setBanned(boolean banned) {
}

@Override
public boolean isWhitelisted() {
return false;
Expand Down