From f556c71e9a26c909842f0c9bc52db9a07b2d1c8a Mon Sep 17 00:00:00 2001 From: 956237586 Date: Fri, 27 Oct 2023 09:14:59 +0800 Subject: [PATCH] test action test action --- .github/workflows/publish-on-space.yml | 8 ++++++-- build.gradle.kts | 2 +- buildSrc/src/main/kotlin/publishOnSpace.kt | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-on-space.yml b/.github/workflows/publish-on-space.yml index ce4f6e8b..24d53756 100644 --- a/.github/workflows/publish-on-space.yml +++ b/.github/workflows/publish-on-space.yml @@ -3,7 +3,8 @@ name: Publish on Space on: push: branches: [ master, publish_* ] - + tags: + - "v*" jobs: publish: name: publish on space @@ -19,6 +20,9 @@ jobs: uses: actions/setup-java@v1 with: java-version: '11' + - name: Tag name # Inspired from https://github.community/t/how-to-get-just-the-tag-name/16241/11 + id: tag_name + run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} - name: Add properties run: | echo -n publishingVersion= >> gradle.properties @@ -26,4 +30,4 @@ jobs: - name: Clean run: ./gradlew clean - name: Publish to space - run: ./gradlew :projector-${{ matrix.modules }}:publish -PmavenUsername=${{ secrets.SPACE_NAME }} -PmavenPassword=${{ secrets.SPACE_TOKEN }} + run: ./gradlew :projector-${{ matrix.modules }}:publish -PpublishingVersion=${{ steps.tag_name.outputs.SOURCE_TAG }} -PmavenUsername=${{ secrets.SPACE_NAME }} -PmavenPassword=${{ secrets.SPACE_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index cf9e8502..4819fa6c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,7 +36,7 @@ val targetJvm: String by project val publishingVersion: String by project subprojects { - group = "org.jetbrains.projector" + group = "cn.hylstudio.skykoma.projector-client" version = publishingVersion repositories { diff --git a/buildSrc/src/main/kotlin/publishOnSpace.kt b/buildSrc/src/main/kotlin/publishOnSpace.kt index 2af57cb0..61c774f3 100644 --- a/buildSrc/src/main/kotlin/publishOnSpace.kt +++ b/buildSrc/src/main/kotlin/publishOnSpace.kt @@ -34,11 +34,11 @@ public fun Project.publishToSpace(fromComponent: String) { publications { create("maven") { pom { - url.set("https://github.com/JetBrains/projector-client") + url.set("https://github.com/956237586/projector-client") licenses { license { name.set("MIT Licence") - url.set("https://github.com/JetBrains/projector-client/blob/master/LICENSE.txt") + url.set("https://github.com/956237586/projector-client/blob/master/LICENSE.txt") } } } @@ -47,7 +47,7 @@ public fun Project.publishToSpace(fromComponent: String) { } } repositories { - maven("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") { + maven("https://packages.aliyun.com/maven/repository/2425368-release-jMTt8f/") { credentials(PasswordCredentials::class) } }