Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try draft --release #460

Merged
merged 1 commit into from
Sep 22, 2023
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
20 changes: 18 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ jobs:
body: "This release was automatically created by Github Actions. Please wait until the author manually sets the patchnotes for this release."
tag_name: ${{ env.RELEASE_VERSION }}
release_name: Release ${{ env.RELEASE_VERSION }}
draft: false
draft: true
prerelease: false

- name: Upload Bukkit Release to Github
- name: Upload Latest Bukkit Release to Github
if: "contains(github.event.head_commit.message, '--release') && contains(github.ref, 'master')"
uses: actions/upload-release-asset@v1
env:
Expand All @@ -82,6 +82,22 @@ jobs:
asset_name: BlockBall.jar
asset_content_type: application/jar

- name: Build Java Application with all flag
run: |
sed -i "s/###VERSION###/all/g" ./blockball-bukkit-plugin/src/main/java/com/github/shynixn/blockball/bukkit/BlockBallPlugin.kt
./gradlew build pluginJar

- name: Upload All Bukkit Release to Github
if: "contains(github.event.head_commit.message, '--release') && contains(github.ref, 'master')"
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /home/runner/work/BlockBall/BlockBall/blockball-bukkit-plugin/build/libs/blockball-bukkit-plugin-${{ env.RELEASE_VERSION }}.jar
asset_name: BlockBall-All.jar
asset_content_type: application/jar

Documentation:
runs-on: ubuntu-latest
if: "contains(github.ref, 'master')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class BlockBallPlugin : JavaPlugin(), PluginProxy {
private var injector: Injector? = null
private var serverVersion: Version? = null
private val bstatsPluginId = 1317
private val versionFlag = "###VERSION###"

/**
* Gets the installed version of the plugin.
Expand Down Expand Up @@ -69,7 +70,8 @@ class BlockBallPlugin : JavaPlugin(), PluginProxy {
return
}

if (!getServerVersion().isCompatible(
val versions = if (versionFlag == "all") {
arrayOf(
Version.VERSION_1_8_R3,
Version.VERSION_1_9_R2,
Version.VERSION_1_10_R1,
Expand All @@ -89,10 +91,16 @@ class BlockBallPlugin : JavaPlugin(), PluginProxy {
Version.VERSION_1_19_R3,
Version.VERSION_1_20_R1,
)
) {
} else {
arrayOf(
Version.VERSION_1_20_R1,
)
}

if (!getServerVersion().isCompatible(*versions)) {
sendConsoleMessage(ChatColor.RED.toString() + "================================================")
sendConsoleMessage(ChatColor.RED.toString() + "BlockBall does not support your server version")
sendConsoleMessage(ChatColor.RED.toString() + "Install v" + Version.VERSION_1_8_R3.id + " - v" + Version.VERSION_1_20_R1.id)
sendConsoleMessage(ChatColor.RED.toString() + "Install v" + versions[0].id + " - v" + versions[versions.size - 1].id)
sendConsoleMessage(ChatColor.RED.toString() + "Plugin gets now disabled!")
sendConsoleMessage(ChatColor.RED.toString() + "================================================")

Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tasks.register("printVersion") {

subprojects {
group 'com.github.shynixn.blockball'
version '6.34.2'
version '6.34.3'

sourceCompatibility = 1.8

Expand Down Expand Up @@ -121,16 +121,16 @@ subprojects {
name = 'Shynixn'
url = 'https://github.com/Shynixn'
}
developer {
name = 'LazoYoung'
url = 'https://github.com/LazoYoung'
}
}
contributors {
contributor {
name = 'tildearrow'
url = 'https://github.com/tildearrow'
}
contributor {
name = 'LazoYoung'
url = 'https://github.com/LazoYoung'
}
}
scm {
connection = 'scm:git:git://github.com/Shynixn/BlockBall.git'
Expand Down
Loading