File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 2828 gradle-version : " 8.11.1"
2929
3030 - name : Build with Gradle (Kotlin DSL)
31- run : gradle --no-daemon clean shadowJar sourcesJar javadocJar
31+ run : gradle --no-daemon clean jar sourcesJar javadocJar
3232
3333 - name : Upload plugin artifact
3434 uses : actions/upload-artifact@v4
3939 - name : Get Plugin Version
4040 id : version
4141 run : |
42- JAR_PATH=$(ls build/libs/${{ github.event.repository.name }}-*.jar | grep -vE '(-sources|-javadoc).jar' | head -n 1)
43- VERSION=$(basename "$JAR_PATH" .jar | sed "s/${{ github.event.repository.name }}-//")
42+ VERSION=$(gradle -q properties --property version | awk '/^version:/ {print $2}')
43+ if [ -z "$VERSION" ]; then
44+ echo "Could not determine project version"
45+ exit 1
46+ fi
4447 echo "VERSION=$VERSION" >> $GITHUB_ENV
4548
4649 - name : Delete existing GitHub release (if exists)
6568
6669 - name : Rename & Upload Latest Release
6770 run : |
68- JAR_FILE=$(ls build/libs/${{ github.event.repository.name }}-*.jar | grep -vE '(-sources|-javadoc).jar' | head -n 1)
69- cp "$JAR_FILE" build/libs/${{ github.event.repository.name }}-latest.jar
71+ cp build/libs/${{ github.event.repository.name }}-${{ env.VERSION }}.jar build/libs/${{ github.event.repository.name }}-latest.jar
7072
7173 - name : Create GitHub Release
7274 uses : softprops/action-gh-release@v1
Original file line number Diff line number Diff line change 1- import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2-
31plugins {
42 kotlin(" jvm" ) version " 2.3.20-Beta1"
53 id(" java-library" )
@@ -62,14 +60,6 @@ tasks.withType<JavaCompile>().configureEach {
6260 options.compilerArgs.add(" -Xlint:-options" )
6361}
6462
65- tasks.withType<ShadowJar >().configureEach {
66- exclude(" META-INF/**" )
67- }
68-
69- tasks.build {
70- dependsOn(" shadowJar" )
71- }
72-
7363tasks.processResources {
7464 val props = mapOf (" version" to version)
7565 inputs.properties(props)
You can’t perform that action at this time.
0 commit comments