From cd5a5b63806e464ce20e0c0b10bad2a2565dfe24 Mon Sep 17 00:00:00 2001 From: phoenix <85183285+PhoenixOrigin@users.noreply.github.com> Date: Sun, 15 Oct 2023 16:51:36 +0100 Subject: [PATCH] praying --- .github/workflows/publish.yml | 13 +++++++++---- build.gradle | 8 ++++++-- gradle.properties | 1 + settings.gradle | 1 - 4 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 gradle.properties diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index edc84ff..271a75a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,10 +25,15 @@ jobs: - name: checkout source uses: actions/checkout@v3 - name: Generate versions - uses: HardNorth/github-version-generate@v1.2.0 + id: version + uses: HardNorth/github-version-generate@v1.3.0 with: version-source: file - version-file: ${{ env.VERSION_FILE }} + version-file: gradle.properties + version-file-extraction-pattern: '(?<=version=).+' + - name: Update gradle.properties + run: | + sed -i 's/^version=.*/version${{ env.NEXT_VERSION }}/' gradle.properties - name: Setup JDK uses: actions/setup-java@v3 with: @@ -48,6 +53,6 @@ jobs: password: ${{ secrets.password }} format: maven2 repository: maven-releases - coordinates: groupId=net.phoenix artifactId=eventemitter version=1.0.2 + coordinates: groupId=net.phoenix artifactId=eventemitter version=${{ env.NEXT_VERSION }} assets: extension=jar - filename: /build/libs/EventEmitter-1.0-all.jar \ No newline at end of file + filename: /build/libs/EventEmitter.jar \ No newline at end of file diff --git a/build.gradle b/build.gradle index 331b1c3..918b63c 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group = 'net.phoenix' -version = '1.0' +version = project.version repositories { mavenCentral() @@ -17,4 +17,8 @@ dependencies { test { useJUnitPlatform() -} \ No newline at end of file +} + +shadowJar { + archiveFileName = 'EventEmitter.jar' +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..beb72cc --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +version=1.0.0 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 1a7cf5c..2485124 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1 @@ rootProject.name = 'EventEmitter' -