From 4220d84513abad7d7afbc6ff307ea877bd141dff Mon Sep 17 00:00:00 2001 From: "Daniel A. A. Pelsmaeker" Date: Wed, 24 Jul 2024 22:16:34 +0200 Subject: [PATCH] Publish on devenv-release/* tag --- .github/workflows/build.yaml | 10 +++++++--- .github/workflows/dependencies.yaml | 11 ----------- build.gradle.kts | 5 +++++ example/build.gradle.kts | 5 +++-- plugin/build.gradle.kts | 26 ++++++++++++++++++-------- 5 files changed, 33 insertions(+), 24 deletions(-) delete mode 100644 .github/workflows/dependencies.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 81a58ce..47973ac 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,6 @@ on: # yamllint disable-line rule:truthy pull_request: branches: - master - - develop jobs: build: @@ -15,7 +14,7 @@ jobs: uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main with: gradle-command: | - gradle assemble publish -Pgitonium.isSnapshot=true + gradle publish -Pgitonium.isSnapshot=true gradle-version-command: | gradle -q :printVersion -Pgitonium.isSnapshot=true if: "github.event_name == 'push' && github.ref == 'refs/heads/master'" @@ -25,7 +24,12 @@ jobs: METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }} publish-release: uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main - if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release-')" + with: + gradle-command: | + gradle publish + gradle-version-command: | + gradle -q :printVersion + if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/devenv-release/')" needs: [build] secrets: METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }} diff --git a/.github/workflows/dependencies.yaml b/.github/workflows/dependencies.yaml deleted file mode 100644 index 2dfa0ef..0000000 --- a/.github/workflows/dependencies.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: 'Submit Dependencies' - -on: # yamllint disable-line rule:truthy - push: - branches: - - master - -jobs: - build: - uses: metaborg/actions/.github/workflows/gradle-dependencies.yaml@main diff --git a/build.gradle.kts b/build.gradle.kts index 04460b9..34154b4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,7 @@ allprojects { // Configure Gitonium before setting the version gitonium { mainBranch.set("master") + tagPrefix.set("devenv-release/") } version = gitonium.version @@ -34,3 +35,7 @@ allprojects { } } } + +rootProjectConvention { + registerPublishTasks.set(true) +} diff --git a/example/build.gradle.kts b/example/build.gradle.kts index 5da4745..3cd64b0 100644 --- a/example/build.gradle.kts +++ b/example/build.gradle.kts @@ -9,5 +9,6 @@ plugins { id("org.metaborg.devenv.spoofax.gradle.test") apply false } -// Workaround for issue: https://github.com/gradle/gradle/issues/20131 -println("") +rootProjectConvention { + registerStubPublishTasks.set(true) +} diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 3a73ca0..c776e2e 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -1,11 +1,4 @@ -/** - * The Spoofax Gradle plugin can be built standalone (i.e., when running `./gradlew buildAll` from the root of this - * repository), or can be built as part of the devenv repository. When built standalone, we depend on Spoofax 2 - * artifacts directly. When built as part of devenv, we depend on the devenv (denoted by 'org.metaborg.devenv' group ID) - * versions of Spoofax 2 artifacts, and also publish this plugin as a separate devenv artifact. To use this plugin as - * part of devenv, you must insert '.devenv' after 'org.metaborg' in the artifact ID. For example: - * `plugins { id("org.metaborg.devenv.spoofax.gradle.langspec") }` - */ +import org.metaborg.convention.Developer // Workaround for issue: https://youtrack.jetbrains.com/issue/KTIJ-19369 @Suppress("DSL_SCOPE_VIOLATION") @@ -15,8 +8,16 @@ plugins { id("org.metaborg.convention.maven-publish") `kotlin-dsl` `java-gradle-plugin` + alias(libs.plugins.gitonium) } +// Configure Gitonium before setting the version +gitonium { + mainBranch.set("master") + tagPrefix.set("devenv-release/") +} + +version = gitonium.version group = "org.metaborg.devenv" dependencies { @@ -97,7 +98,16 @@ sourceSets { // } //} + mavenPublishConvention { repoOwner.set("metaborg") repoName.set("spoofax.gradle") + + metadata { + inceptionYear.set("2019") + developers.set(listOf( + Developer("Gohla", "Gabriel Konat", "gabrielkonat@gmail.com"), + Developer("Virtlink", "Daniel A. A. Pelsmaeker", "developer@pelsmaeker.net"), + )) + } }