Skip to content

Commit

Permalink
ci: Use tag's version for plugin version
Browse files Browse the repository at this point in the history
  • Loading branch information
funniray committed Nov 11, 2023
1 parent b410c40 commit a099771
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 15 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ jobs:
java-version: '8'
distribution: 'adopt'
cache: 'gradle'
- name: Build with Gradle
run: gradle build
- uses: actions/upload-artifact@v2
with:
name: Package
path: build
- name: Bump version and push tag
id: tag_version
uses: anothrNick/github-tag-action@1.55.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
INITIAL_VERSION: 1.0.0
- name: Build with Gradle
run: ./gradlew build
env:
VERSION: ${{ steps.tag_version.outputs.new_tag }}
- uses: actions/upload-artifact@v2
with:
name: Package
path: build
- uses: ncipollo/release-action@v1
with:
artifacts: "build/*"
Expand Down
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
Empty file modified gradlew
100644 → 100755
Empty file.
14 changes: 13 additions & 1 deletion spigot/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
plugins {
`java-library`
id("com.github.johnrengelman.shadow") version "7.1.2"
id("net.minecrell.plugin-yml.bukkit") version "0.5.2"
}

val versionStr = (System.getenv("VERSION")?: "v1.0.0").removePrefix("v")

group = "com.funniray.minimap"
version = "1.0"
version = versionStr

repositories {
mavenCentral()
Expand Down Expand Up @@ -60,3 +63,12 @@ tasks {
}
}
}

bukkit {
name = "MinimapControl"
main = "com.funniray.minimap.spigot.SpigotMinimap"
authors = listOf("funniray")
description = "Control minimap settings from server-side software"

apiVersion = "1.13"
}
6 changes: 0 additions & 6 deletions spigot/src/main/resources/plugin.yml

This file was deleted.

6 changes: 4 additions & 2 deletions sponge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ repositories {
mavenCentral()
}

val versionStr = (System.getenv("VERSION")?: "v1.0.0").removePrefix("v")

group = "com.funniray.minimap"
version = "1.0"
version = versionStr

sponge {
apiVersion("8.1.0")
license("All Rights Reserved")
loader {
name(PluginLoaders.JAVA_PLAIN)
version("1.0")
version(versionStr)
}
plugin("minimap") {
displayName("Minimap")
Expand Down

0 comments on commit a099771

Please sign in to comment.