Skip to content

Commit

Permalink
Publish on devenv-release/* tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 24, 2024
1 parent 2dcca9e commit 4220d84
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 24 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on: # yamllint disable-line rule:truthy
pull_request:
branches:
- master
- develop

jobs:
build:
Expand All @@ -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'"
Expand All @@ -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 }}
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/dependencies.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ allprojects {
// Configure Gitonium before setting the version
gitonium {
mainBranch.set("master")
tagPrefix.set("devenv-release/")
}

version = gitonium.version
Expand All @@ -34,3 +35,7 @@ allprojects {
}
}
}

rootProjectConvention {
registerPublishTasks.set(true)
}
5 changes: 3 additions & 2 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
26 changes: 18 additions & 8 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -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 {
Expand Down Expand Up @@ -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"),
))
}
}

0 comments on commit 4220d84

Please sign in to comment.